public class TestWALSplitToHFile extends Object
| Modifier and Type | Field and Description |
|---|---|
static HBaseClassTestRule |
CLASS_RULE |
private org.apache.hadoop.conf.Configuration |
conf |
private static int |
countPerFamily |
private org.apache.hadoop.hbase.util.EnvironmentEdge |
ee |
private org.apache.hadoop.fs.FileSystem |
fs |
private static org.slf4j.Logger |
LOG |
private org.apache.hadoop.fs.Path |
logDir |
private String |
logName |
private org.apache.hadoop.fs.Path |
oldLogDir |
private static byte[] |
QUALIFIER |
private org.apache.hadoop.fs.Path |
rootDir |
private static byte[] |
ROW |
org.junit.rules.TestName |
TEST_NAME |
(package private) static HBaseTestingUtility |
UTIL |
private static byte[] |
VALUE1 |
private static byte[] |
VALUE2 |
private org.apache.hadoop.hbase.wal.WALFactory |
wals |
| Constructor and Description |
|---|
TestWALSplitToHFile() |
| Modifier and Type | Method and Description |
|---|---|
private org.apache.hadoop.hbase.client.TableDescriptor |
createBasic3FamilyTD(org.apache.hadoop.hbase.TableName tableName) |
private org.apache.hadoop.hbase.wal.WAL |
createWAL(org.apache.hadoop.conf.Configuration c,
org.apache.hadoop.fs.Path hbaseRootDir,
String logName) |
private org.apache.hadoop.hbase.wal.WAL |
createWAL(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path hbaseRootDir,
String logName) |
private void |
deleteDir(org.apache.hadoop.fs.Path p) |
private int |
getScannedCount(org.apache.hadoop.hbase.regionserver.RegionScanner scanner) |
void |
setUp() |
static void |
setUpBeforeClass() |
private org.apache.hadoop.hbase.util.Pair<org.apache.hadoop.hbase.client.TableDescriptor,org.apache.hadoop.hbase.client.RegionInfo> |
setupTableAndRegion() |
void |
tearDown() |
static void |
tearDownAfterClass() |
void |
testAfterAbortingFlush()
Test that we could recover the data correctly after aborting flush.
|
void |
testAfterPartialFlush()
Test that we recover correctly when there is a failure in between the
flushes.
|
void |
testCorruptRecoveredHFile() |
void |
testDifferentRootDirAndWALRootDir() |
void |
testPutWithSameTimestamp() |
void |
testRecoverSequenceId() |
void |
testWrittenViaHRegion()
Test writing edits into an HRegion, closing it, splitting logs, opening
Region again.
|
private void |
writeCorruptRecoveredHFile(org.apache.hadoop.fs.Path recoveredHFile) |
private void |
writeData(org.apache.hadoop.hbase.client.TableDescriptor td,
org.apache.hadoop.hbase.regionserver.HRegion region) |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
static final HBaseTestingUtility UTIL
private final org.apache.hadoop.hbase.util.EnvironmentEdge ee
private org.apache.hadoop.fs.Path rootDir
private org.apache.hadoop.fs.Path oldLogDir
private org.apache.hadoop.fs.Path logDir
private org.apache.hadoop.fs.FileSystem fs
private org.apache.hadoop.conf.Configuration conf
private org.apache.hadoop.hbase.wal.WALFactory wals
private static final byte[] ROW
private static final byte[] QUALIFIER
private static final byte[] VALUE1
private static final byte[] VALUE2
private static final int countPerFamily
public final org.junit.rules.TestName TEST_NAME
public TestWALSplitToHFile()
public static void setUpBeforeClass() throws Exception
Exceptionpublic static void tearDownAfterClass() throws Exception
Exceptionprivate void deleteDir(org.apache.hadoop.fs.Path p) throws IOException
IOExceptionprivate org.apache.hadoop.hbase.client.TableDescriptor createBasic3FamilyTD(org.apache.hadoop.hbase.TableName tableName) throws IOException
IOExceptionprivate org.apache.hadoop.hbase.wal.WAL createWAL(org.apache.hadoop.conf.Configuration c, org.apache.hadoop.fs.Path hbaseRootDir, String logName) throws IOException
IOExceptionprivate org.apache.hadoop.hbase.wal.WAL createWAL(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path hbaseRootDir, String logName) throws IOException
IOExceptionprivate org.apache.hadoop.hbase.util.Pair<org.apache.hadoop.hbase.client.TableDescriptor,org.apache.hadoop.hbase.client.RegionInfo> setupTableAndRegion() throws IOException
IOExceptionprivate void writeData(org.apache.hadoop.hbase.client.TableDescriptor td, org.apache.hadoop.hbase.regionserver.HRegion region) throws IOException
IOExceptionpublic void testDifferentRootDirAndWALRootDir() throws Exception
Exceptionpublic void testCorruptRecoveredHFile() throws Exception
Exceptionpublic void testPutWithSameTimestamp() throws Exception
Exceptionpublic void testRecoverSequenceId() throws Exception
Exceptionpublic void testWrittenViaHRegion() throws IOException, SecurityException, IllegalArgumentException, InterruptedException
public void testAfterPartialFlush() throws IOException, SecurityException, IllegalArgumentException
public void testAfterAbortingFlush() throws IOException
IOExceptionprivate int getScannedCount(org.apache.hadoop.hbase.regionserver.RegionScanner scanner) throws IOException
IOExceptionprivate void writeCorruptRecoveredHFile(org.apache.hadoop.fs.Path recoveredHFile) throws Exception
ExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.