Package org.apache.hadoop.hbase.mob
Class TestMobStoreCompaction
java.lang.Object
org.apache.hadoop.hbase.mob.TestMobStoreCompaction
Test mob store compaction
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static final byte[]private intprivate org.apache.hadoop.conf.Configurationprivate org.apache.hadoop.fs.FileSystemprivate org.apache.hadoop.hbase.HColumnDescriptorprivate org.apache.hadoop.hbase.HTableDescriptor(package private) static final org.slf4j.Loggerprivate longorg.junit.rules.TestNameprivate org.apache.hadoop.hbase.regionserver.HRegionprivate final byte[]private Booleanprivate static final HBaseTestingUtility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate longprivate intprivate intprivate intprivate intprivate voidcreateHFile(org.apache.hadoop.fs.Path path, int rowIdx, byte[] dummyData) Create an HFile with the given number of bytesprivate org.apache.hadoop.hbase.client.PutcreatePut(int rowIdx, byte[] dummyData) static Collection<Boolean>data()private voidinit(org.apache.hadoop.conf.Configuration conf, long mobThreshold) private byte[]makeDummyData(int size) private static org.apache.hadoop.hbase.regionserver.HRegionsetMobThreshold(org.apache.hadoop.hbase.regionserver.HRegion region, byte[] cfName, long modThreshold) voidtearDown()voidDuring compaction, the mob threshold size is changed.voidvoidThis test will first generate store files, then bulk load them and trigger the compaction.voidDuring compaction, cells smaller than the threshold won't be affected.
-
Field Details
-
CLASS_RULE
-
name
-
LOG
-
UTIL
-
conf
-
region
-
htd
-
hcd
-
mobCellThreshold
-
fs
-
COLUMN_FAMILY
-
STARTROW
-
compactionThreshold
-
useFileBasedSFT
-
-
Constructor Details
-
TestMobStoreCompaction
-
-
Method Details
-
data
-
init
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
testSmallerValue
During compaction, cells smaller than the threshold won't be affected.- Throws:
Exception
-
testLargerValue
During compaction, the mob threshold size is changed.- Throws:
Exception
-
setMobThreshold
private static org.apache.hadoop.hbase.regionserver.HRegion setMobThreshold(org.apache.hadoop.hbase.regionserver.HRegion region, byte[] cfName, long modThreshold) -
testMobCompactionWithBulkload
This test will first generate store files, then bulk load them and trigger the compaction. When compaction, the cell value will be larger than the threshold.- Throws:
Exception
-
testMajorCompactionAfterDelete
- Throws:
Exception
-
countStoreFiles
- Throws:
IOException
-
countMobFiles
- Throws:
IOException
-
countMobCellsInMetadata
- Throws:
IOException
-
createPut
private org.apache.hadoop.hbase.client.Put createPut(int rowIdx, byte[] dummyData) throws IOException - Throws:
IOException
-
createHFile
private void createHFile(org.apache.hadoop.fs.Path path, int rowIdx, byte[] dummyData) throws IOException Create an HFile with the given number of bytes- Throws:
IOException
-
countMobRows
- Throws:
IOException
-
makeDummyData
-
countReferencedMobFiles
- Throws:
IOException
-