Class TestCompaction
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestCompaction
- Direct Known Subclasses:
TestCompactionWithCoprocessor
Test compaction framework and common functions
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
static class
(package private) class
static class
SimpleCompactionLifeCycleTracker
on which you can wait until the requested compaction finishes.static class
SimpleCompactionLifeCycleTracker
on which you can wait until the requested compaction finishes. -
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final byte[]
private static final byte[]
private int
protected org.apache.hadoop.conf.Configuration
private final byte[]
private org.apache.hadoop.hbase.HTableDescriptor
private static final long
org.junit.rules.TestName
private org.apache.hadoop.hbase.regionserver.HRegion
private byte[]
private final byte[]
private byte[]
private static final HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate int
count()
private static org.apache.hadoop.hbase.regionserver.HStoreFile
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
void
Test compaction priority management and multiple compactions per store (HBASE-8665).void
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
void
Verify that you can stop a long-running compaction (used during RS shutdown)void
void
void
HBASE-7947: Regression test to ensure adding to the correct list in theCompactSplit
void
Test no new Compaction requests are generated after calling stop compactionsvoid
Create a custom compaction request and be sure that we can track it through the queue, knowing when the compaction is completed.
-
Field Details
-
CLASS_RULE
-
name
-
UTIL
-
conf
-
r
-
htd
-
COLUMN_FAMILY
-
STARTROW
-
COLUMN_FAMILY_TEXT
-
compactionThreshold
-
secondRowBytes
-
thirdRowBytes
-
MAX_FILES_TO_COMPACT
- See Also:
-
FAMILY
-
-
Constructor Details
-
TestCompaction
public TestCompaction()constructor
-
-
Method Details
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
testInterruptCompactionBySize
Verify that you can stop a long-running compaction (used during RS shutdown)- Throws:
Exception
-
testInterruptCompactionByTime
- Throws:
Exception
-
count
- Throws:
IOException
-
createStoreFile
private void createStoreFile(org.apache.hadoop.hbase.regionserver.HRegion region) throws IOException - Throws:
IOException
-
createStoreFile
private void createStoreFile(org.apache.hadoop.hbase.regionserver.HRegion region, String family) throws IOException - Throws:
IOException
-
testCompactionWithCorruptResult
- Throws:
Exception
-
testTrackingCompactionRequest
Create a custom compaction request and be sure that we can track it through the queue, knowing when the compaction is completed.- Throws:
Exception
-
testCompactionFailure
- Throws:
Exception
-
testStopStartCompaction
Test no new Compaction requests are generated after calling stop compactions- Throws:
IOException
-
testInterruptingRunningCompactions
- Throws:
Exception
-
testMultipleCustomCompactionRequests
HBASE-7947: Regression test to ensure adding to the correct list in theCompactSplit
- Throws:
Exception
- on failure
-
testCompactionQueuePriorities
Test compaction priority management and multiple compactions per store (HBASE-8665).- Throws:
Exception
-
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. The latest cell (cell-A) in hfile1 and the oldest cell (cell-B) in hfile2 are with the same time stamp but different sequence id, and will get scanned successively during compaction. We set compaction.kv.max to 10 so compaction will scan 10 versions each round, meanwhile we set keepSeqIdPeriod=0 inTestCompaction.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-16931 if error occurs during the test- Throws:
Exception
-
createFile
- Throws:
Exception
-