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,TestBackupRestoreExpiry,TestBackupShowHistory,TestBackupSmallTests,TestBackupStatusProgress,TestFullBackup,TestFullBackupSet,TestFullBackupSetRestoreSet,TestFullBackupWithFailures,TestFullRestore,TestIncrementalBackup,TestIncrementalBackupDeleteTable,TestIncrementalBackupMergeWithFailures,TestIncrementalBackupWithBulkLoad,TestIncrementalBackupWithDataLoss,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
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static booleanprotected static Stringprotected static Stringprotected static org.apache.hadoop.conf.Configurationprotected static org.apache.hadoop.conf.Configurationprotected static final byte[]private static final org.slf4j.Loggerprotected static final intprotected static Stringprotected static final byte[]protected static booleanprotected static org.apache.hadoop.hbase.TableNameprotected static org.apache.hadoop.hbase.TableNameprotected static org.apache.hadoop.hbase.client.TableDescriptorprotected static org.apache.hadoop.hbase.TableNameprotected static org.apache.hadoop.hbase.TableNameprotected static org.apache.hadoop.hbase.TableNameprotected static org.apache.hadoop.hbase.TableNameprotected static org.apache.hadoop.hbase.TableNameprotected static HBaseTestingUtilprotected static HBaseTestingUtilprotected static boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbackupTables(org.apache.hadoop.hbase.backup.BackupType type, List<org.apache.hadoop.hbase.TableName> tables, String path) protected booleancheckFailed(String backupId) protected booleancheckSucceeded(String backupId) protected org.apache.hadoop.hbase.backup.BackupRequestcreateBackupRequest(org.apache.hadoop.hbase.backup.BackupType type, List<org.apache.hadoop.hbase.TableName> tables, String path) protected org.apache.hadoop.hbase.backup.BackupRequestcreateBackupRequest(org.apache.hadoop.hbase.backup.BackupType type, List<org.apache.hadoop.hbase.TableName> tables, String path, boolean noChecksumVerify) protected static voidprotected voidprotected StringfullTableBackup(List<org.apache.hadoop.hbase.TableName> tables) protected static org.apache.hadoop.hbase.backup.BackupAdminprivate org.apache.hadoop.hbase.backup.BackupInfogetBackupInfo(String backupId) protected List<org.apache.hadoop.fs.FileStatus>getListOfWALFiles(org.apache.hadoop.conf.Configuration c) protected StringincrementalTableBackup(List<org.apache.hadoop.hbase.TableName> tables) (package private) org.apache.hadoop.hbase.client.TableinsertIntoTable(org.apache.hadoop.hbase.client.Connection conn, org.apache.hadoop.hbase.TableName table, byte[] family, int id, int numRows) protected static voidloadTable(org.apache.hadoop.hbase.client.Table table) private static voidpopulateFromMasterConfig(org.apache.hadoop.conf.Configuration masterConf, org.apache.hadoop.conf.Configuration conf) static voidsetUp()Setup Cluster with appropriate configurations before running tests.static voidstatic voidtearDown()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) -
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, boolean noChecksumVerify) -
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
-