public class TestCompaction extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
TestCompaction.BlockingStoreMockMaker |
static class |
TestCompaction.DummyCompactor |
(package private) class |
TestCompaction.StoreMockMaker |
static class |
TestCompaction.Tracker
Simple
CompactionLifeCycleTracker on which you can wait until the requested compaction
finishes. |
| Modifier and Type | Field and Description |
|---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static byte[] |
COLUMN_FAMILY |
private static byte[] |
COLUMN_FAMILY_TEXT |
private int |
compactionThreshold |
protected org.apache.hadoop.conf.Configuration |
conf |
private byte[] |
FAMILY |
private org.apache.hadoop.hbase.HTableDescriptor |
htd |
private static long |
MAX_FILES_TO_COMPACT |
org.junit.rules.TestName |
name |
private org.apache.hadoop.hbase.regionserver.HRegion |
r |
private byte[] |
secondRowBytes |
private byte[] |
STARTROW |
private byte[] |
thirdRowBytes |
private static HBaseTestingUtility |
UTIL |
| Constructor and Description |
|---|
TestCompaction()
constructor
|
| Modifier and Type | Method and Description |
|---|---|
private int |
count() |
private static org.apache.hadoop.hbase.regionserver.HStoreFile |
createFile() |
private void |
createStoreFile(org.apache.hadoop.hbase.regionserver.HRegion region) |
private void |
createStoreFile(org.apache.hadoop.hbase.regionserver.HRegion region,
String family) |
void |
setUp() |
void |
tearDown() |
void |
testCompactionFailure() |
void |
testCompactionQueuePriorities()
Test compaction priority management and multiple compactions per store (HBASE-8665).
|
void |
testCompactionSeqId()
Firstly write 10 cells (with different time stamp) to a qualifier and flush
to hfile1, then write 10 cells (with different time stamp) to the same
qualifier and flush to hfile2.
|
void |
testCompactionWithCorruptResult() |
void |
testInterruptCompaction()
Verify that you can stop a long-running compaction
(used during RS shutdown)
|
void |
testMultipleCustomCompactionRequests()
HBASE-7947: Regression test to ensure adding to the correct list in the
CompactSplit |
void |
testTrackingCompactionRequest()
Create a custom compaction request and be sure that we can track it through the queue, knowing
when the compaction is completed.
|
public static final HBaseClassTestRule CLASS_RULE
public org.junit.rules.TestName name
private static final HBaseTestingUtility UTIL
protected org.apache.hadoop.conf.Configuration conf
private org.apache.hadoop.hbase.regionserver.HRegion r
private org.apache.hadoop.hbase.HTableDescriptor htd
private static final byte[] COLUMN_FAMILY
private final byte[] STARTROW
private static final byte[] COLUMN_FAMILY_TEXT
private int compactionThreshold
private byte[] secondRowBytes
private byte[] thirdRowBytes
private static final long MAX_FILES_TO_COMPACT
private final byte[] FAMILY
public TestCompaction()
public void testInterruptCompaction() throws Exception
Exceptionprivate int count() throws IOException
IOExceptionprivate void createStoreFile(org.apache.hadoop.hbase.regionserver.HRegion region) throws IOException
IOExceptionprivate void createStoreFile(org.apache.hadoop.hbase.regionserver.HRegion region, String family) throws IOException
IOExceptionpublic void testCompactionWithCorruptResult() throws Exception
Exceptionpublic void testTrackingCompactionRequest() throws Exception
Exceptionpublic void testCompactionFailure() throws Exception
Exceptionpublic void testMultipleCustomCompactionRequests() throws Exception
CompactSplitException - on failurepublic void testCompactionQueuePriorities() throws Exception
Exceptionpublic void testCompactionSeqId() throws Exception
TestCompaction.DummyCompactor so all
10 versions of hfile2 will be written out with seqId cleaned (set to 0)
including cell-B, then when scanner goes to cell-A it will cause a scan
out-of-order assertion error before HBASE-16931Exception - if error occurs during the testprivate static org.apache.hadoop.hbase.regionserver.HStoreFile createFile() throws Exception
ExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.