public class TestStripeStoreFileManager extends Object
| Modifier and Type | Field and Description |
|---|---|
private static org.apache.hadoop.fs.Path |
BASEDIR |
private static org.apache.hadoop.fs.Path |
CFDIR |
static HBaseClassTestRule |
CLASS_RULE |
private static byte[] |
KEY_A |
private static byte[] |
KEY_B |
private static byte[] |
KEY_C |
private static byte[] |
KEY_D |
private static org.apache.hadoop.hbase.KeyValue |
KV_A |
private static org.apache.hadoop.hbase.KeyValue |
KV_B |
private static org.apache.hadoop.hbase.KeyValue |
KV_C |
private static org.apache.hadoop.hbase.KeyValue |
KV_D |
private static HBaseTestingUtility |
TEST_UTIL |
| Constructor and Description |
|---|
TestStripeStoreFileManager() |
| Modifier and Type | Method and Description |
|---|---|
private static ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> |
al(org.apache.hadoop.hbase.regionserver.HStoreFile... sfs) |
private static MockHStoreFile |
createFile() |
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 |
createManager() |
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 |
testAddingCompactionResults() |
void |
testClearFiles() |
void |
testCompactionAndFlushConflict() |
void |
testEmptyResultsForStripes() |
void |
testGetFilesForGetAndScan() |
void |
testGetSplitPointEdgeCases() |
void |
testGetStripeBoundarySplits() |
void |
testGetUnbalancedSplits() |
void |
testInsertFilesIntoL0() |
void |
testLoadFilesAfterSplit() |
void |
testLoadFilesWithBadStripe() |
void |
testLoadFilesWithGaps() |
void |
testLoadFilesWithRecoverableBadFiles() |
void |
testPriority() |
private void |
testPriorityScenario(int expectedPriority,
int limit,
int stripes,
int filesInStripe,
int l0Files) |
void |
testRowKeyBefore() |
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.
|
public static final HBaseClassTestRule CLASS_RULE
private static final HBaseTestingUtility TEST_UTIL
private static final org.apache.hadoop.fs.Path BASEDIR
private static final org.apache.hadoop.fs.Path CFDIR
private static final byte[] KEY_A
private static final byte[] KEY_B
private static final byte[] KEY_C
private static final byte[] KEY_D
private static final org.apache.hadoop.hbase.KeyValue KV_A
private static final org.apache.hadoop.hbase.KeyValue KV_B
private static final org.apache.hadoop.hbase.KeyValue KV_C
private static final org.apache.hadoop.hbase.KeyValue KV_D
public TestStripeStoreFileManager()
public void testInsertFilesIntoL0() throws Exception
Exceptionpublic void testClearFiles() throws Exception
Exceptionprivate static ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> dumpIterator(Iterator<org.apache.hadoop.hbase.regionserver.HStoreFile> iter)
public void testRowKeyBefore() throws Exception
Exceptionpublic void testGetSplitPointEdgeCases() throws Exception
Exceptionpublic void testGetStripeBoundarySplits() throws Exception
Exceptionpublic void testGetUnbalancedSplits() throws Exception
Exceptionprivate void verifySplitPointScenario(int splitPointAfter, boolean shouldSplitStripe, float splitRatioToVerify, int... sizes) throws Exception
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.Exceptionprivate static byte[] keyAfter(byte[] key)
public void testGetFilesForGetAndScan() throws Exception
Exceptionprivate void verifyGetAndScanScenario(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, byte[] start, byte[] end, org.apache.hadoop.hbase.regionserver.HStoreFile... results) throws Exception
Exceptionpublic void testLoadFilesWithRecoverableBadFiles() throws Exception
Exceptionpublic void testLoadFilesWithBadStripe() throws Exception
Exceptionpublic void testLoadFilesWithGaps() throws Exception
Exceptionpublic void testLoadFilesAfterSplit() throws Exception
Exceptionpublic void testAddingCompactionResults() throws Exception
Exceptionpublic void testCompactionAndFlushConflict() throws Exception
Exceptionpublic void testEmptyResultsForStripes() throws Exception
Exceptionpublic void testPriority() throws Exception
Exceptionprivate void testPriorityScenario(int expectedPriority, int limit, int stripes, int filesInStripe, int l0Files) throws Exception
Exceptionprivate 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
Exceptionprivate void verifyGetOrScanScenario(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, byte[] start, byte[] end, org.apache.hadoop.hbase.regionserver.HStoreFile... results) throws Exception
Exceptionprivate void verifyGetOrScanScenario(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, byte[] start, byte[] end, Collection<org.apache.hadoop.hbase.regionserver.HStoreFile> results) throws Exception
Exceptionprivate void verifyAllFiles(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, Collection<org.apache.hadoop.hbase.regionserver.HStoreFile> results) throws Exception
Exceptionprivate static MockHStoreFile createFile(long size, long seqNum, byte[] startKey, byte[] endKey) throws Exception
Exceptionprivate static MockHStoreFile createFile(long size, long seqNum) throws Exception
Exceptionprivate static MockHStoreFile createFile(byte[] startKey, byte[] endKey) throws Exception
Exceptionprivate static MockHStoreFile createFile() throws Exception
Exceptionprivate static org.apache.hadoop.hbase.regionserver.StripeStoreFileManager createManager() throws Exception
Exceptionprivate static org.apache.hadoop.hbase.regionserver.StripeStoreFileManager createManager(ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> sfs) throws Exception
Exceptionprivate static org.apache.hadoop.hbase.regionserver.StripeStoreFileManager createManager(ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> sfs, org.apache.hadoop.conf.Configuration conf) throws Exception
Exceptionprivate static ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> al(org.apache.hadoop.hbase.regionserver.HStoreFile... sfs)
private static ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> flattenLists(ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile>... sfls)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.