Package org.apache.hadoop.hbase.mob
Class TestMobStoreCompaction
java.lang.Object
org.apache.hadoop.hbase.mob.TestMobStoreCompaction
@Tag("org.apache.hadoop.hbase.testclassification.MediumTests")
public class TestMobStoreCompaction
extends Object
Test mob store compaction
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]private intprivate org.apache.hadoop.conf.Configurationprivate org.apache.hadoop.hbase.client.ColumnFamilyDescriptorprivate org.apache.hadoop.fs.FileSystemprivate longprivate org.apache.hadoop.hbase.regionserver.HRegionprivate final byte[]private org.apache.hadoop.hbase.client.TableDescriptorprivate Stringprivate Booleanprivate static final HBaseTestingUtil -
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) private voidinit(org.apache.hadoop.conf.Configuration conf, long mobThreshold) private byte[]makeDummyData(int size) static Stream<org.junit.jupiter.params.provider.Arguments>private static org.apache.hadoop.hbase.regionserver.HRegionsetMobThreshold(org.apache.hadoop.hbase.regionserver.HRegion region, byte[] cfName, long modThreshold) voidsetUp(org.junit.jupiter.api.TestInfo testInfo) 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
-
UTIL
-
conf
-
testMethodName
-
region
-
tableDescriptor
-
familyDescriptor
-
mobCellThreshold
-
fs
-
COLUMN_FAMILY
-
STARTROW
-
compactionThreshold
-
useFileBasedSFT
-
-
Constructor Details
-
TestMobStoreCompaction
-
-
Method Details
-
parameters
-
setUp
-
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
-