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
Exception
public void testClearFiles() throws Exception
Exception
private static ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> dumpIterator(Iterator<org.apache.hadoop.hbase.regionserver.HStoreFile> iter)
public void testRowKeyBefore() throws Exception
Exception
public void testGetSplitPointEdgeCases() throws Exception
Exception
public void testGetStripeBoundarySplits() throws Exception
Exception
public void testGetUnbalancedSplits() throws Exception
Exception
private 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.Exception
private static byte[] keyAfter(byte[] key)
public void testGetFilesForGetAndScan() throws Exception
Exception
private void verifyGetAndScanScenario(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, byte[] start, byte[] end, org.apache.hadoop.hbase.regionserver.HStoreFile... results) throws Exception
Exception
public void testLoadFilesWithRecoverableBadFiles() throws Exception
Exception
public void testLoadFilesWithBadStripe() throws Exception
Exception
public void testLoadFilesWithGaps() throws Exception
Exception
public void testLoadFilesAfterSplit() throws Exception
Exception
public void testAddingCompactionResults() throws Exception
Exception
public void testCompactionAndFlushConflict() throws Exception
Exception
public void testEmptyResultsForStripes() throws Exception
Exception
public void testPriority() throws Exception
Exception
private void testPriorityScenario(int expectedPriority, int limit, int stripes, int filesInStripe, int l0Files) throws Exception
Exception
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
Exception
private void verifyGetOrScanScenario(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, byte[] start, byte[] end, org.apache.hadoop.hbase.regionserver.HStoreFile... results) throws Exception
Exception
private void verifyGetOrScanScenario(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, byte[] start, byte[] end, Collection<org.apache.hadoop.hbase.regionserver.HStoreFile> results) throws Exception
Exception
private void verifyAllFiles(org.apache.hadoop.hbase.regionserver.StripeStoreFileManager manager, Collection<org.apache.hadoop.hbase.regionserver.HStoreFile> results) throws Exception
Exception
private static MockHStoreFile createFile(long size, long seqNum, byte[] startKey, byte[] endKey) throws Exception
Exception
private static MockHStoreFile createFile(long size, long seqNum) throws Exception
Exception
private static MockHStoreFile createFile(byte[] startKey, byte[] endKey) throws Exception
Exception
private static MockHStoreFile createFile() throws Exception
Exception
private static org.apache.hadoop.hbase.regionserver.StripeStoreFileManager createManager() throws Exception
Exception
private static org.apache.hadoop.hbase.regionserver.StripeStoreFileManager createManager(ArrayList<org.apache.hadoop.hbase.regionserver.HStoreFile> sfs) throws Exception
Exception
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
Exception
private 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.