Package org.apache.hadoop.hbase.mob
Class TestMobFileCleanupUtilAfterSplitOrMerge
java.lang.Object
org.apache.hadoop.hbase.mob.TestMobFileCleanupUtilAfterSplitOrMerge
@Tag("org.apache.hadoop.hbase.testclassification.MediumTests")
public class TestMobFileCleanupUtilAfterSplitOrMerge
extends Object
Verifies that the master side obsolete MOB file cleanup does not archive MOB files which are
named after a split or merge parent region but are still referenced by the daughter regions.
A non user compaction does not rewrite MOB cells, it only carries the MOB references into the new store file. So after the parent region is garbage collected, the MOB files whose name suffix is the parent region are still live.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static org.apache.hadoop.hbase.client.Adminprivate static org.apache.hadoop.conf.Configurationprivate static final byte[]private static final HBaseTestingUtilprivate static final org.slf4j.Loggerprivate static final longprivate static final byte[]private static final intprivate static final byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidassertMobFilesNamedAfter(Set<String> mobFiles, org.apache.hadoop.hbase.client.RegionInfo... regions) private org.apache.hadoop.hbase.client.TablecreateMobTable(org.apache.hadoop.hbase.TableName tableName, byte[][] splitKeys) getReferencedMobFiles(List<org.apache.hadoop.hbase.regionserver.HRegion> regions) listMobFiles(org.apache.hadoop.hbase.TableName tableName) private voidloadAndFlush(org.apache.hadoop.hbase.client.Table table) static voidstatic voidvoidtestReferencedMobFilesOfMergeParentsAreKept(org.junit.jupiter.api.TestInfo testInfo) voidtestReferencedMobFilesOfSplitParentAreKept(org.junit.jupiter.api.TestInfo testInfo) private static byte[]value(int row) private voidverifyCleanupKeepsReferencedMobFiles(org.apache.hadoop.hbase.client.Table table, Set<String> parentMobFiles, org.apache.hadoop.hbase.client.RegionInfo... parents) private intverifyRows(org.apache.hadoop.hbase.client.Table table) private voidwaitUntilNoReferences(org.apache.hadoop.hbase.regionserver.HRegion region)
-
Field Details
-
LOG
-
HTU
-
FAMILY
-
QUALIFIER
-
MOB_THRESHOLD
- See Also:
-
ROWS
- See Also:
-
SPLIT_KEY
-
conf
-
admin
-
-
Constructor Details
-
TestMobFileCleanupUtilAfterSplitOrMerge
-
-
Method Details
-
setUpBeforeClass
- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
testReferencedMobFilesOfSplitParentAreKept
@Test public void testReferencedMobFilesOfSplitParentAreKept(org.junit.jupiter.api.TestInfo testInfo) throws Exception - Throws:
Exception
-
testReferencedMobFilesOfMergeParentsAreKept
@Test public void testReferencedMobFilesOfMergeParentsAreKept(org.junit.jupiter.api.TestInfo testInfo) throws Exception - Throws:
Exception
-
verifyCleanupKeepsReferencedMobFiles
private void verifyCleanupKeepsReferencedMobFiles(org.apache.hadoop.hbase.client.Table table, Set<String> parentMobFiles, org.apache.hadoop.hbase.client.RegionInfo... parents) throws Exception - Throws:
Exception
-
createMobTable
private org.apache.hadoop.hbase.client.Table createMobTable(org.apache.hadoop.hbase.TableName tableName, byte[][] splitKeys) throws IOException - Throws:
IOException
-
value
-
loadAndFlush
- Throws:
IOException
-
verifyRows
- Throws:
IOException
-
listMobFiles
- Throws:
IOException
-
assertMobFilesNamedAfter
private static void assertMobFilesNamedAfter(Set<String> mobFiles, org.apache.hadoop.hbase.client.RegionInfo... regions) -
getReferencedMobFiles
private static Set<String> getReferencedMobFiles(List<org.apache.hadoop.hbase.regionserver.HRegion> regions) -
waitUntilNoReferences
-