public class TestMobStoreCompaction extends Object
| Modifier and Type | Field and Description |
|---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static byte[] |
COLUMN_FAMILY |
private int |
compactionThreshold |
private org.apache.hadoop.conf.Configuration |
conf |
private org.apache.hadoop.fs.FileSystem |
fs |
private org.apache.hadoop.hbase.HColumnDescriptor |
hcd |
private org.apache.hadoop.hbase.HTableDescriptor |
htd |
(package private) static org.slf4j.Logger |
LOG |
private long |
mobCellThreshold |
org.junit.rules.TestName |
name |
private org.apache.hadoop.hbase.regionserver.HRegion |
region |
private byte[] |
STARTROW |
private static HBaseTestingUtility |
UTIL |
| Constructor and Description |
|---|
TestMobStoreCompaction() |
| Modifier and Type | Method and Description |
|---|---|
private long |
countMobCellsInMetadata() |
private int |
countMobCellsInMobFiles(int expectedNumDelfiles) |
private int |
countMobFiles() |
private int |
countMobRows() |
private int |
countReferencedMobFiles() |
private int |
countStoreFiles() |
private void |
createHFile(org.apache.hadoop.fs.Path path,
int rowIdx,
byte[] dummyData)
Create an HFile with the given number of bytes
|
private org.apache.hadoop.hbase.client.Put |
createPut(int rowIdx,
byte[] dummyData) |
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) |
static void |
setUpBeforeClass() |
void |
tearDown() |
static void |
tearDownAfterClass() |
void |
testLargerValue()
During compaction, the mob threshold size is changed.
|
void |
testMajorCompactionAfterDelete() |
void |
testMobCompactionWithBulkload()
This test will first generate store files, then bulk load them and trigger the compaction.
|
void |
testSmallerValue()
During compaction, cells smaller than the threshold won't be affected.
|
public static final HBaseClassTestRule CLASS_RULE
public org.junit.rules.TestName name
static final org.slf4j.Logger LOG
private static final HBaseTestingUtility UTIL
private org.apache.hadoop.conf.Configuration conf
private org.apache.hadoop.hbase.regionserver.HRegion region
private org.apache.hadoop.hbase.HTableDescriptor htd
private org.apache.hadoop.hbase.HColumnDescriptor hcd
private long mobCellThreshold
private org.apache.hadoop.fs.FileSystem fs
private static final byte[] COLUMN_FAMILY
private final byte[] STARTROW
private int compactionThreshold
public TestMobStoreCompaction()
public static void setUpBeforeClass() throws Exception
Exceptionpublic static void tearDownAfterClass() throws Exception
Exceptionprivate void init(org.apache.hadoop.conf.Configuration conf, long mobThreshold) throws Exception
Exceptionpublic void testSmallerValue() throws Exception
Exceptionpublic void testLargerValue() throws Exception
Exceptionprivate static org.apache.hadoop.hbase.regionserver.HRegion setMobThreshold(org.apache.hadoop.hbase.regionserver.HRegion region, byte[] cfName, long modThreshold)
public void testMobCompactionWithBulkload() throws Exception
Exceptionpublic void testMajorCompactionAfterDelete() throws Exception
Exceptionprivate int countStoreFiles() throws IOException
IOExceptionprivate int countMobFiles() throws IOException
IOExceptionprivate long countMobCellsInMetadata() throws IOException
IOExceptionprivate org.apache.hadoop.hbase.client.Put createPut(int rowIdx, byte[] dummyData) throws IOException
IOExceptionprivate void createHFile(org.apache.hadoop.fs.Path path, int rowIdx, byte[] dummyData) throws IOException
IOExceptionprivate int countMobRows() throws IOException
IOExceptionprivate byte[] makeDummyData(int size)
private int countReferencedMobFiles() throws IOException
IOExceptionprivate int countMobCellsInMobFiles(int expectedNumDelfiles) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.