Package org.apache.hadoop.hbase.backup
Class TestBackupBase
java.lang.Object
org.apache.hadoop.hbase.backup.TestBackupBase
- Direct Known Subclasses:
TestBackupBoundaryTests
,TestBackupDelete
,TestBackupDeleteRestore
,TestBackupDeleteWithFailures
,TestBackupDescribe
,TestBackupLogCleaner
,TestBackupMerge
,TestBackupMultipleDeletes
,TestBackupRepair
,TestBackupShowHistory
,TestBackupSmallTests
,TestBackupStatusProgress
,TestFullBackup
,TestFullBackupSet
,TestFullBackupSetRestoreSet
,TestFullBackupWithFailures
,TestFullRestore
,TestIncrementalBackup
,TestIncrementalBackupDeleteTable
,TestIncrementalBackupMergeWithFailures
,TestIncrementalBackupWithFailures
,TestRemoteBackup
,TestRemoteRestore
,TestRepairAfterFailedDelete
,TestRestoreBoundaryTests
,TestSystemTableSnapshot
This class is only a base for other integration-level backup tests. Do not add tests here.
TestBackupSmallTests is where tests that don't require bring machines up/down should go All other
tests should have their own classes and extend this one
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
(package private) static class
-
Field Summary
Modifier and TypeFieldDescriptionprotected static boolean
protected static String
protected static String
protected static org.apache.hadoop.conf.Configuration
protected static org.apache.hadoop.conf.Configuration
protected static final byte[]
private static final org.slf4j.Logger
protected static final int
protected static String
protected static final byte[]
protected static boolean
protected static org.apache.hadoop.hbase.TableName
protected static org.apache.hadoop.hbase.TableName
protected static org.apache.hadoop.hbase.client.TableDescriptor
protected static org.apache.hadoop.hbase.TableName
protected static org.apache.hadoop.hbase.TableName
protected static org.apache.hadoop.hbase.TableName
protected static org.apache.hadoop.hbase.TableName
protected static org.apache.hadoop.hbase.TableName
protected static HBaseTestingUtility
protected static HBaseTestingUtility
protected static boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
backupTables
(org.apache.hadoop.hbase.backup.BackupType type, List<org.apache.hadoop.hbase.TableName> tables, String path) protected boolean
checkFailed
(String backupId) protected boolean
checkSucceeded
(String backupId) protected org.apache.hadoop.hbase.backup.BackupRequest
createBackupRequest
(org.apache.hadoop.hbase.backup.BackupType type, List<org.apache.hadoop.hbase.TableName> tables, String path) protected static void
protected void
protected String
fullTableBackup
(List<org.apache.hadoop.hbase.TableName> tables) protected org.apache.hadoop.hbase.backup.BackupAdmin
private org.apache.hadoop.hbase.backup.BackupInfo
getBackupInfo
(String backupId) protected List<org.apache.hadoop.fs.FileStatus>
getListOfWALFiles
(org.apache.hadoop.conf.Configuration c) protected String
incrementalTableBackup
(List<org.apache.hadoop.hbase.TableName> tables) (package private) org.apache.hadoop.hbase.client.Table
insertIntoTable
(org.apache.hadoop.hbase.client.Connection conn, org.apache.hadoop.hbase.TableName table, byte[] family, int id, int numRows) protected static void
loadTable
(org.apache.hadoop.hbase.client.Table table) private static void
populateFromMasterConfig
(org.apache.hadoop.conf.Configuration masterConf, org.apache.hadoop.conf.Configuration conf) static void
setUp()
Setup Cluster with appropriate configurations before running tests.static void
static void
tearDown()
protected List<org.apache.hadoop.hbase.TableName>
Helper method
-
Field Details
-
LOG
-
TEST_UTIL
-
TEST_UTIL2
-
conf1
-
conf2
-
table1
-
table1Desc
-
table2
-
table3
-
table4
-
table1_restore
-
table2_restore
-
table3_restore
-
NB_ROWS_IN_BATCH
- See Also:
-
qualName
-
famName
-
BACKUP_ROOT_DIR
-
BACKUP_REMOTE_ROOT_DIR
-
provider
-
secure
-
autoRestoreOnFailure
-
useSecondCluster
-
-
Constructor Details
-
TestBackupBase
public TestBackupBase()
-
-
Method Details
-
setUpHelper
- Throws:
Exception
-
setUp
Setup Cluster with appropriate configurations before running tests.- Throws:
Exception
- if starting the mini cluster or setting up the tables fails
-
populateFromMasterConfig
private static void populateFromMasterConfig(org.apache.hadoop.conf.Configuration masterConf, org.apache.hadoop.conf.Configuration conf) -
tearDown
- Throws:
Exception
-
insertIntoTable
org.apache.hadoop.hbase.client.Table insertIntoTable(org.apache.hadoop.hbase.client.Connection conn, org.apache.hadoop.hbase.TableName table, byte[] family, int id, int numRows) throws IOException - Throws:
IOException
-
createBackupRequest
protected org.apache.hadoop.hbase.backup.BackupRequest createBackupRequest(org.apache.hadoop.hbase.backup.BackupType type, List<org.apache.hadoop.hbase.TableName> tables, String path) -
backupTables
protected String backupTables(org.apache.hadoop.hbase.backup.BackupType type, List<org.apache.hadoop.hbase.TableName> tables, String path) throws IOException - Throws:
IOException
-
fullTableBackup
- Throws:
IOException
-
incrementalTableBackup
protected String incrementalTableBackup(List<org.apache.hadoop.hbase.TableName> tables) throws IOException - Throws:
IOException
-
loadTable
- Throws:
Exception
-
createTables
- Throws:
Exception
-
checkSucceeded
- Throws:
IOException
-
checkFailed
- Throws:
IOException
-
getBackupInfo
- Throws:
IOException
-
getBackupAdmin
- Throws:
IOException
-
toList
Helper method -
getListOfWALFiles
protected List<org.apache.hadoop.fs.FileStatus> getListOfWALFiles(org.apache.hadoop.conf.Configuration c) throws IOException - Throws:
IOException
-
dumpBackupDir
- Throws:
IOException
-