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 Boolean |
useFileBasedSFT |
private static HBaseTestingUtility |
UTIL |
Constructor and Description |
---|
TestMobStoreCompaction(Boolean useFileBasedSFT) |
Modifier and Type | Method and Description |
---|---|
private long |
countMobCellsInMetadata() |
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) |
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 |
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
private Boolean useFileBasedSFT
public TestMobStoreCompaction(Boolean useFileBasedSFT)
public static Collection<Boolean> data()
private void init(org.apache.hadoop.conf.Configuration conf, long mobThreshold) throws Exception
Exception
public void testSmallerValue() throws Exception
Exception
public void testLargerValue() throws Exception
Exception
private static org.apache.hadoop.hbase.regionserver.HRegion setMobThreshold(org.apache.hadoop.hbase.regionserver.HRegion region, byte[] cfName, long modThreshold)
public void testMobCompactionWithBulkload() throws Exception
Exception
public void testMajorCompactionAfterDelete() throws Exception
Exception
private int countStoreFiles() throws IOException
IOException
private int countMobFiles() throws IOException
IOException
private long countMobCellsInMetadata() throws IOException
IOException
private org.apache.hadoop.hbase.client.Put createPut(int rowIdx, byte[] dummyData) throws IOException
IOException
private void createHFile(org.apache.hadoop.fs.Path path, int rowIdx, byte[] dummyData) throws IOException
IOException
private int countMobRows() throws IOException
IOException
private byte[] makeDummyData(int size)
private int countReferencedMobFiles() throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.