Package org.apache.hadoop.hbase.snapshot
Class ExportSnapshotTestBase
java.lang.Object
org.apache.hadoop.hbase.snapshot.ExportSnapshotTestBase
- Direct Known Subclasses:
ConsecutiveExportsTestBase,ExportFileSystemStateTestBase,ExportFileSystemStateWithMergeOrSplitRegionTestBase,ExportSnapshotMiscTestBase,ExportSnapshotRetryTestBase,ExportWithChecksumTestBase
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.hadoop.hbase.client.Adminprotected Stringprotected static final byte[]private static final org.slf4j.Loggerprotected Stringprotected booleanprotected Stringprotected org.apache.hadoop.hbase.TableNameprotected intprotected static final HBaseTestingUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidcreateTable(org.apache.hadoop.hbase.TableName tableName) protected final ExportSnapshotTestBase.RegionPredicateprotected final org.apache.hadoop.fs.Pathprotected static org.apache.hadoop.fs.PathlistFiles(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path root, org.apache.hadoop.fs.Path dir) static Stream<org.junit.jupiter.params.provider.Arguments>protected static voidremoveExportDir(org.apache.hadoop.fs.Path path) protected static intrunExportSnapshot(org.apache.hadoop.conf.Configuration conf, String sourceSnapshotName, String targetSnapshotName, org.apache.hadoop.fs.Path srcDir, org.apache.hadoop.fs.Path rawTgtDir, boolean overwrite, boolean resetTtl, boolean checksumVerify, boolean noSourceVerify, boolean noTargetVerify) voidsetUp(org.junit.jupiter.api.TestInfo testInfo) Create a table and take a snapshot of the table used by the export test.voidtearDown()static voidprotected static voidtestExportFileSystemState(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.TableName tableName, String snapshotName, String targetName, int filesExpected, org.apache.hadoop.fs.Path srcDir, org.apache.hadoop.fs.Path rawTgtDir, boolean overwrite, boolean resetTtl, ExportSnapshotTestBase.RegionPredicate bypassregionPredicate, boolean success, boolean checksumVerify) Creates destination directory, runs ExportSnapshot() tool, and runs some verifications.protected final voidtestExportFileSystemState(org.apache.hadoop.hbase.TableName tableName, String snapshotName, String targetName, int filesExpected) protected final voidtestExportFileSystemState(org.apache.hadoop.hbase.TableName tableName, String snapshotName, String targetName, int filesExpected, org.apache.hadoop.fs.Path copyDir, boolean overwrite) protected final voidtestExportFileSystemState(org.apache.hadoop.hbase.TableName tableName, String snapshotName, String targetName, int filesExpected, org.apache.hadoop.fs.Path copyDir, boolean overwrite, boolean resetTtl) verifySnapshot(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path rootDir, org.apache.hadoop.hbase.TableName tableName, String snapshotName, boolean resetTtl, ExportSnapshotTestBase.RegionPredicate bypassregionPredicate) protected static voidverifySnapshotDir(org.apache.hadoop.fs.FileSystem fs1, org.apache.hadoop.fs.Path root1, org.apache.hadoop.fs.FileSystem fs2, org.apache.hadoop.fs.Path root2)
-
Field Details
-
LOG
-
TEST_UTIL
-
FAMILY
-
methodName
-
tableName
-
emptySnapshotName
-
snapshotName
-
tableNumFiles
-
admin
-
mob
-
-
Constructor Details
-
ExportSnapshotTestBase
-
-
Method Details
-
parameters
-
tearDownAfterClass
- Throws:
Exception
-
setUp
Create a table and take a snapshot of the table used by the export test.- Throws:
Exception
-
createTable
- Throws:
Exception
-
getBypassRegionPredicate
-
tearDown
- Throws:
Exception
-
testExportFileSystemState
protected final void testExportFileSystemState(org.apache.hadoop.hbase.TableName tableName, String snapshotName, String targetName, int filesExpected) throws Exception - Throws:
Exception
-
testExportFileSystemState
protected final void testExportFileSystemState(org.apache.hadoop.hbase.TableName tableName, String snapshotName, String targetName, int filesExpected, org.apache.hadoop.fs.Path copyDir, boolean overwrite) throws Exception - Throws:
Exception
-
testExportFileSystemState
protected final void testExportFileSystemState(org.apache.hadoop.hbase.TableName tableName, String snapshotName, String targetName, int filesExpected, org.apache.hadoop.fs.Path copyDir, boolean overwrite, boolean resetTtl) throws Exception - Throws:
Exception
-
testExportFileSystemState
protected static void testExportFileSystemState(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.TableName tableName, String snapshotName, String targetName, int filesExpected, org.apache.hadoop.fs.Path srcDir, org.apache.hadoop.fs.Path rawTgtDir, boolean overwrite, boolean resetTtl, ExportSnapshotTestBase.RegionPredicate bypassregionPredicate, boolean success, boolean checksumVerify) throws Exception Creates destination directory, runs ExportSnapshot() tool, and runs some verifications.- Throws:
Exception
-
verifySnapshotDir
protected static void verifySnapshotDir(org.apache.hadoop.fs.FileSystem fs1, org.apache.hadoop.fs.Path root1, org.apache.hadoop.fs.FileSystem fs2, org.apache.hadoop.fs.Path root2) throws IOException - Throws:
IOException
-
verifySnapshot
protected static Set<String> verifySnapshot(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path rootDir, org.apache.hadoop.hbase.TableName tableName, String snapshotName, boolean resetTtl, ExportSnapshotTestBase.RegionPredicate bypassregionPredicate) throws IOException - Throws:
IOException
-
listFiles
private static Set<String> listFiles(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path root, org.apache.hadoop.fs.Path dir) throws IOException - Throws:
IOException
-
getHdfsDestinationDir
-
getLocalDestinationDir
-
removeExportDir
- Throws:
IOException
-
runExportSnapshot
protected static int runExportSnapshot(org.apache.hadoop.conf.Configuration conf, String sourceSnapshotName, String targetSnapshotName, org.apache.hadoop.fs.Path srcDir, org.apache.hadoop.fs.Path rawTgtDir, boolean overwrite, boolean resetTtl, boolean checksumVerify, boolean noSourceVerify, boolean noTargetVerify) throws Exception - Throws:
Exception
-