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
Exception
public static void tearDownAfterClass() throws Exception
Exception
private void deleteDir(org.apache.hadoop.fs.Path p) throws IOException
IOException
private org.apache.hadoop.hbase.client.TableDescriptor createBasic3FamilyTD(org.apache.hadoop.hbase.TableName tableName) throws IOException
IOException
private org.apache.hadoop.hbase.wal.WAL createWAL(org.apache.hadoop.conf.Configuration c, org.apache.hadoop.fs.Path hbaseRootDir, String logName) throws IOException
IOException
private org.apache.hadoop.hbase.wal.WAL createWAL(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path hbaseRootDir, String logName) throws IOException
IOException
private org.apache.hadoop.hbase.util.Pair<org.apache.hadoop.hbase.client.TableDescriptor,org.apache.hadoop.hbase.client.RegionInfo> setupTableAndRegion() throws IOException
IOException
private void writeData(org.apache.hadoop.hbase.client.TableDescriptor td, org.apache.hadoop.hbase.regionserver.HRegion region) throws IOException
IOException
public void testDifferentRootDirAndWALRootDir() throws Exception
Exception
public void testCorruptRecoveredHFile() throws Exception
Exception
public void testPutWithSameTimestamp() throws Exception
Exception
public void testRecoverSequenceId() throws Exception
Exception
public void testWrittenViaHRegion() throws IOException, SecurityException, IllegalArgumentException, InterruptedException
public void testAfterPartialFlush() throws IOException, SecurityException, IllegalArgumentException
public void testAfterAbortingFlush() throws IOException
IOException
private int getScannedCount(org.apache.hadoop.hbase.regionserver.RegionScanner scanner) throws IOException
IOException
private void writeCorruptRecoveredHFile(org.apache.hadoop.fs.Path recoveredHFile) throws Exception
Exception
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.