Package org.apache.hadoop.hbase.client
Class CloneSnapshotFromClientAfterSplittingRegionWithLinksTestBase
java.lang.Object
org.apache.hadoop.hbase.client.CloneSnapshotFromClientTestBase
org.apache.hadoop.hbase.client.CloneSnapshotFromClientAfterSplittingRegionWithLinksTestBase
- Direct Known Subclasses:
TestCloneSnapshotFromClientAfterSplittingRegionWithLinks,TestMobCloneSnapshotFromClientAfterSplittingRegionWithLinks
public class CloneSnapshotFromClientAfterSplittingRegionWithLinksTestBase
extends CloneSnapshotFromClientTestBase
Base class for testing the clone-snapshot flow when the snapshot was taken after a split that
produced whole-file
HFileLinks for the daughters instead of Reference files.
Since HBASE-26421, a split builds an HFileLink (not a Reference) for a daughter
whenever a store file lies entirely on one side of the split point. When every store file falls
on one side, the snapshot contains no reference files at all, so the daughters link directly to
the snapshot files and do not depend on the cloned parent region. This is the complement of the
Reference case verified by CloneSnapshotFromClientAfterSplittingRegionTestBase
(the regression HBASE-29111 guards against): here there is no parent-to-daughter mapping to
record, and the cloned table must still be safe after the source table and snapshot are removed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.hadoop.hbase.TableNameprivate static final Stringprivate static final Stringprivate static final byte[]private static final intprivate Stringprivate static final byte[]Fields inherited from class org.apache.hadoop.hbase.client.CloneSnapshotFromClientTestBase
admin, emptySnapshot, FAMILY, numReplicas, snapshot0Rows, snapshot1Rows, snapshotName0, snapshotName1, snapshotName2, tableName, TEST_UTIL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCloneSnapshotFromClientAfterSplittingRegionWithLinksTestBase(int numReplicas) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate voidprotected voidCreate a single-region table so that we fully control its store files before splitting.protected voidprotected voidinitSnapshotNames(long tid) private intprivate voidprivate voidprotected static voidvoidvoidMethods inherited from class org.apache.hadoop.hbase.client.CloneSnapshotFromClientTestBase
countRows, getValidMethodName, numRowsToLoad, parameters, setUp, tearDown, tearDownAfterClass, verifyRowCount
-
Field Details
-
QUALIFIER
-
ROWS_PER_BATCH
- See Also:
-
LOW_PREFIX
- See Also:
-
HIGH_PREFIX
- See Also:
-
SPLIT_KEY
-
clonedTableName
-
snapshotName
-
-
Constructor Details
-
CloneSnapshotFromClientAfterSplittingRegionWithLinksTestBase
-
-
Method Details
-
setupConfiguration
-
initSnapshotNames
- Overrides:
initSnapshotNamesin classCloneSnapshotFromClientTestBase
-
createTableAndSnapshots
- Overrides:
createTableAndSnapshotsin classCloneSnapshotFromClientTestBase- Throws:
Exception
-
tearDownClone
- Throws:
Exception
-
createTable
Create a single-region table so that we fully control its store files before splitting.- Overrides:
createTablein classCloneSnapshotFromClientTestBase- Throws:
IOExceptionInterruptedException
-
testClonedTableWithLinksSurvivesSourceDeletion
- Throws:
Exception
-
loadTwoDisjointStoreFiles
- Throws:
IOException
-
putBatch
- Throws:
IOException
-
assertDaughtersHaveOnlyLinks
- Throws:
IOException
-
assertClonedSplitParentHasNoDaughters
- Throws:
IOException
-
runHFileCleaner
- Throws:
IOException
-