public class TestCompactionState extends Object
| Modifier and Type | Field and Description |
|---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static org.slf4j.Logger |
LOG |
org.junit.rules.TestName |
name |
private static Random |
random |
private static HBaseTestingUtility |
TEST_UTIL |
| Constructor and Description |
|---|
TestCompactionState() |
| Modifier and Type | Method and Description |
|---|---|
private void |
compaction(String tableName,
int flushes,
org.apache.hadoop.hbase.client.CompactionState expectedState,
boolean singleFamily)
Load data to a table, flush it to disk, trigger compaction,
confirm the compaction state is right and wait till it is done.
|
private static int |
countStoreFilesInFamilies(List<org.apache.hadoop.hbase.regionserver.HRegion> regions,
byte[][] families) |
private static int |
countStoreFilesInFamily(List<org.apache.hadoop.hbase.regionserver.HRegion> regions,
byte[] family) |
private static void |
loadData(org.apache.hadoop.hbase.client.Table ht,
byte[][] families,
int rows,
int flushes) |
static void |
setUpBeforeClass() |
static void |
tearDownAfterClass() |
void |
testInvalidColumnFamily() |
void |
testMajorCompaction() |
void |
testMajorCompactionOnFamily() |
void |
testMinorCompaction() |
void |
testMinorCompactionOnFamily() |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility TEST_UTIL
public org.junit.rules.TestName name
public TestCompactionState()
public static void setUpBeforeClass() throws Exception
Exceptionpublic static void tearDownAfterClass() throws Exception
Exceptionpublic void testMajorCompaction() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void testMinorCompaction() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void testMajorCompactionOnFamily() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void testMinorCompactionOnFamily() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void testInvalidColumnFamily() throws IOException, InterruptedException
IOExceptionInterruptedExceptionprivate void compaction(String tableName, int flushes, org.apache.hadoop.hbase.client.CompactionState expectedState, boolean singleFamily) throws IOException, InterruptedException
tableName - flushes - expectedState - singleFamily - otherwise, run compaction on all cfsIOExceptionInterruptedExceptionprivate static int countStoreFilesInFamily(List<org.apache.hadoop.hbase.regionserver.HRegion> regions, byte[] family)
private static int countStoreFilesInFamilies(List<org.apache.hadoop.hbase.regionserver.HRegion> regions, byte[][] families)
private static void loadData(org.apache.hadoop.hbase.client.Table ht, byte[][] families, int rows, int flushes) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.