Class TestStripeStoreFileManager
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestStripeStoreFileManager
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.apache.hadoop.fs.Path
private static final org.apache.hadoop.fs.Path
static final HBaseClassTestRule
private static final byte[]
private static final byte[]
private static final byte[]
private static final byte[]
private static final org.apache.hadoop.hbase.KeyValue
private static final org.apache.hadoop.hbase.KeyValue
private static final org.apache.hadoop.hbase.KeyValue
private static final org.apache.hadoop.hbase.KeyValue
private static final HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile>
al
(org.apache.hadoop.hbase.regionserver.HStoreFile... sfs) private static MockHStoreFile
private static MockHStoreFile
createFile
(byte[] startKey, byte[] endKey) private static MockHStoreFile
createFile
(long size, long seqNum) private static MockHStoreFile
createFile
(long size, long seqNum, byte[] startKey, byte[] endKey) private static org.apache.hadoop.hbase.regionserver.StripeStoreFileManager
private static org.apache.hadoop.hbase.regionserver.StripeStoreFileManager
createManager
(ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> sfs) private static org.apache.hadoop.hbase.regionserver.StripeStoreFileManager
createManager
(ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> sfs, org.apache.hadoop.conf.Configuration conf) private static ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile>
dumpIterator
(Iterator<org.apache.hadoop.hbase.regionserver.HStoreFile> iter) private static ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile>
flattenLists
(ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile>... sfls) private static byte[]
keyAfter
(byte[] key) void
setUp()
void
tearDown()
void
void
void
void
void
void
void
void
void
void
void
void
void
void
private void
testPriorityScenario
(int expectedPriority, int limit, int stripes, int filesInStripe, int l0Files) void
private void
verifyAllFiles
(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, Collection<org.apache.hadoop.hbase.regionserver.HStoreFile> results) private void
verifyGetAndScanScenario
(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, byte[] start, byte[] end, org.apache.hadoop.hbase.regionserver.HStoreFile... results) private void
verifyGetOrScanScenario
(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, byte[] start, byte[] end, Collection<org.apache.hadoop.hbase.regionserver.HStoreFile> results) private void
verifyGetOrScanScenario
(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, byte[] start, byte[] end, org.apache.hadoop.hbase.regionserver.HStoreFile... results) private void
verifyInvalidCompactionScenario
(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> filesToCompact, ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> filesToInsert) private void
verifySplitPointScenario
(int splitPointAfter, boolean shouldSplitStripe, float splitRatioToVerify, int... sizes) Verifies scenario for finding a split point.
-
Field Details
-
CLASS_RULE
-
TEST_UTIL
-
BASEDIR
-
CFDIR
-
KEY_A
-
KEY_B
-
KEY_C
-
KEY_D
-
KV_A
-
KV_B
-
KV_C
-
KV_D
-
-
Constructor Details
-
TestStripeStoreFileManager
public TestStripeStoreFileManager()
-
-
Method Details
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
testInsertFilesIntoL0
- Throws:
Exception
-
testClearFiles
- Throws:
Exception
-
dumpIterator
private static ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> dumpIterator(Iterator<org.apache.hadoop.hbase.regionserver.HStoreFile> iter) -
testRowKeyBefore
- Throws:
Exception
-
testGetSplitPointEdgeCases
- Throws:
Exception
-
testGetStripeBoundarySplits
- Throws:
Exception
-
testGetUnbalancedSplits
- Throws:
Exception
-
verifySplitPointScenario
private void verifySplitPointScenario(int splitPointAfter, boolean shouldSplitStripe, float splitRatioToVerify, int... sizes) throws Exception Verifies scenario for finding a split point.- Parameters:
splitPointAfter
- Stripe to expect the split point at/after.shouldSplitStripe
- If true, the split point is expected in the middle of the above stripe; if false, should be at the end.splitRatioToVerify
- Maximum split imbalance ratio.sizes
- Stripe sizes.- Throws:
Exception
-
keyAfter
-
testGetFilesForGetAndScan
- Throws:
Exception
-
verifyGetAndScanScenario
private void verifyGetAndScanScenario(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, byte[] start, byte[] end, org.apache.hadoop.hbase.regionserver.HStoreFile... results) throws Exception - Throws:
Exception
-
testLoadFilesWithRecoverableBadFiles
- Throws:
Exception
-
testLoadFilesWithBadStripe
- Throws:
Exception
-
testLoadFilesWithGaps
- Throws:
Exception
-
testLoadFilesAfterSplit
- Throws:
Exception
-
testAddingCompactionResults
- Throws:
Exception
-
testCompactionAndFlushConflict
- Throws:
Exception
-
testEmptyResultsForStripes
- Throws:
Exception
-
testPriority
- Throws:
Exception
-
testPriorityScenario
private void testPriorityScenario(int expectedPriority, int limit, int stripes, int filesInStripe, int l0Files) throws Exception - Throws:
Exception
-
verifyInvalidCompactionScenario
private void verifyInvalidCompactionScenario(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> filesToCompact, ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> filesToInsert) throws Exception - Throws:
Exception
-
verifyGetOrScanScenario
private void verifyGetOrScanScenario(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, byte[] start, byte[] end, org.apache.hadoop.hbase.regionserver.HStoreFile... results) throws Exception - Throws:
Exception
-
verifyGetOrScanScenario
private void verifyGetOrScanScenario(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, byte[] start, byte[] end, Collection<org.apache.hadoop.hbase.regionserver.HStoreFile> results) throws Exception - Throws:
Exception
-
verifyAllFiles
private void verifyAllFiles(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, Collection<org.apache.hadoop.hbase.regionserver.HStoreFile> results) throws Exception - Throws:
Exception
-
createFile
private static MockHStoreFile createFile(long size, long seqNum, byte[] startKey, byte[] endKey) throws Exception - Throws:
Exception
-
createFile
- Throws:
Exception
-
createFile
- Throws:
Exception
-
createFile
- Throws:
Exception
-
createManager
private static org.apache.hadoop.hbase.regionserver.StripeStoreFileManager createManager() throws Exception- Throws:
Exception
-
createManager
private static org.apache.hadoop.hbase.regionserver.StripeStoreFileManager createManager(ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> sfs) throws Exception - Throws:
Exception
-
createManager
private static org.apache.hadoop.hbase.regionserver.StripeStoreFileManager createManager(ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> sfs, org.apache.hadoop.conf.Configuration conf) throws Exception - Throws:
Exception
-
al
-
flattenLists
private static ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> flattenLists(ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile>... sfls)
-