public class TestCompactionState extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
TestCompactionState.StateSource |
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
org.junit.rules.TestName |
name |
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,
TestCompactionState.StateSource stateSource)
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 org.apache.hadoop.hbase.client.CompactionState |
getCompactionState(TestCompactionState.StateSource stateSource,
org.apache.hadoop.hbase.master.HMaster master,
org.apache.hadoop.hbase.client.Admin admin,
org.apache.hadoop.hbase.TableName table) |
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 |
testMajorCompactionOnFamilyStateFromAdmin() |
void |
testMajorCompactionOnFamilyStateFromMaster() |
void |
testMajorCompactionStateFromAdmin() |
void |
testMajorCompactionStateFromMaster() |
void |
testMinorCompactionOnFamilyStateFromAdmin() |
void |
testMinorCompactionOnFamilyStateFromMaster() |
void |
testMinorCompactionStateFromAdmin() |
void |
testMinorCompactionStateFromMaster() |
public static final HBaseClassTestRule CLASS_RULE
private static final HBaseTestingUtility TEST_UTIL
public org.junit.rules.TestName name
public TestCompactionState()
public static void setUpBeforeClass() throws Exception
Exception
public static void tearDownAfterClass() throws Exception
Exception
public void testMajorCompactionStateFromAdmin() throws IOException, InterruptedException
IOException
InterruptedException
public void testMinorCompactionStateFromAdmin() throws IOException, InterruptedException
IOException
InterruptedException
public void testMajorCompactionOnFamilyStateFromAdmin() throws IOException, InterruptedException
IOException
InterruptedException
public void testMinorCompactionOnFamilyStateFromAdmin() throws IOException, InterruptedException
IOException
InterruptedException
public void testMajorCompactionStateFromMaster() throws IOException, InterruptedException
IOException
InterruptedException
public void testMinorCompactionStateFromMaster() throws IOException, InterruptedException
IOException
InterruptedException
public void testMajorCompactionOnFamilyStateFromMaster() throws IOException, InterruptedException
IOException
InterruptedException
public void testMinorCompactionOnFamilyStateFromMaster() throws IOException, InterruptedException
IOException
InterruptedException
public void testInvalidColumnFamily() throws IOException, InterruptedException
IOException
InterruptedException
private void compaction(String tableName, int flushes, org.apache.hadoop.hbase.client.CompactionState expectedState, boolean singleFamily, TestCompactionState.StateSource stateSource) throws IOException, InterruptedException
stateSource
- get the state by Admin or Master nnIOException
InterruptedException
private static org.apache.hadoop.hbase.client.CompactionState getCompactionState(TestCompactionState.StateSource stateSource, org.apache.hadoop.hbase.master.HMaster master, org.apache.hadoop.hbase.client.Admin admin, org.apache.hadoop.hbase.TableName table) throws IOException
IOException
private 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
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.