public class TestMajorCompaction extends Object
| 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 org.apache.hadoop.hbase.HTableDescriptor |
htd |
private static org.slf4j.Logger |
LOG |
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 |
|---|
TestMajorCompaction(String compType)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
private int |
count() |
private void |
createSmallerStoreFile(org.apache.hadoop.hbase.regionserver.HRegion region) |
private void |
createStoreFile(org.apache.hadoop.hbase.regionserver.HRegion region) |
private void |
createStoreFile(org.apache.hadoop.hbase.regionserver.HRegion region,
String family) |
static Object[] |
data() |
private void |
majorCompaction() |
void |
majorCompactionWithDataBlockEncoding(boolean inCacheOnly) |
void |
setUp() |
void |
tearDown() |
void |
testDataBlockEncodingEverywhere() |
void |
testDataBlockEncodingInCacheOnly() |
void |
testMajorCompactingToNoOutput()
Test that on a major compaction, if all cells are expired or deleted, then we'll end up with no
product.
|
void |
testMajorCompactingToNoOutputWithReverseScan()
Test that on a major compaction, if all cells are expired or deleted, then we'll end up with no
product.
|
private void |
testMajorCompactingWithDeletes(org.apache.hadoop.hbase.KeepDeletedCells keepDeletedCells) |
void |
testMajorCompactingWithKeepDeletedCells()
Test that on a major compaction,Deleted cells are retained if keep deleted cells is set to true
|
void |
testMajorCompaction()
Run compaction and flushing memstore Assert deletes get cleaned up.
|
void |
testNonUserMajorCompactionRequest()
Test for HBASE-5920 - Test user requested major compactions always occurring
|
void |
testTimeBasedMajorCompaction() |
void |
testUserMajorCompactionRequest()
Test for HBASE-5920
|
private void |
verifyCounts(int countRow1,
int countRow2) |
public static final HBaseClassTestRule CLASS_RULE
public org.junit.rules.TestName name
private static final org.slf4j.Logger LOG
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
public TestMajorCompaction(String compType)
public void testMajorCompactingToNoOutput() throws IOException
IOException - exception encounteredpublic void testMajorCompactingWithKeepDeletedCells() throws IOException
IOException - exception encounteredpublic void testMajorCompaction() throws Exception
Exceptionpublic void testDataBlockEncodingInCacheOnly() throws Exception
Exceptionpublic void testDataBlockEncodingEverywhere() throws Exception
Exceptionpublic void majorCompactionWithDataBlockEncoding(boolean inCacheOnly) throws Exception
Exceptionprivate void majorCompaction() throws Exception
Exceptionpublic void testTimeBasedMajorCompaction() throws Exception
Exceptionprivate void verifyCounts(int countRow1, int countRow2) 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
IOExceptionprivate void createSmallerStoreFile(org.apache.hadoop.hbase.regionserver.HRegion region) throws IOException
IOExceptionpublic void testNonUserMajorCompactionRequest() throws Exception
Exceptionpublic void testUserMajorCompactionRequest() throws IOException
IOExceptionpublic void testMajorCompactingToNoOutputWithReverseScan() throws IOException
IOExceptionprivate void testMajorCompactingWithDeletes(org.apache.hadoop.hbase.KeepDeletedCells keepDeletedCells) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.