Package org.apache.hadoop.hbase.mob
Class TestMobStoreCompaction
java.lang.Object
org.apache.hadoop.hbase.mob.TestMobStoreCompaction
Test mob store compaction
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final byte[]
private int
private org.apache.hadoop.conf.Configuration
private org.apache.hadoop.fs.FileSystem
private org.apache.hadoop.hbase.HColumnDescriptor
private org.apache.hadoop.hbase.HTableDescriptor
(package private) static final org.slf4j.Logger
private long
org.junit.rules.TestName
private org.apache.hadoop.hbase.regionserver.HRegion
private final byte[]
private Boolean
private static final HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate long
private int
private int
private int
private int
private void
createHFile
(org.apache.hadoop.fs.Path path, int rowIdx, byte[] dummyData) Create an HFile with the given number of bytesprivate org.apache.hadoop.hbase.client.Put
createPut
(int rowIdx, byte[] dummyData) static Collection<Boolean>
data()
private void
init
(org.apache.hadoop.conf.Configuration conf, long mobThreshold) private byte[]
makeDummyData
(int size) private static org.apache.hadoop.hbase.regionserver.HRegion
setMobThreshold
(org.apache.hadoop.hbase.regionserver.HRegion region, byte[] cfName, long modThreshold) void
tearDown()
void
During compaction, the mob threshold size is changed.void
void
This test will first generate store files, then bulk load them and trigger the compaction.void
During 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
-