public abstract class AbstractTestWALReplay extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AbstractTestWALReplay.CustomStoreFlusher |
(package private) static class |
AbstractTestWALReplay.MockWAL |
(package private) static class |
AbstractTestWALReplay.TestFlusher |
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf |
org.junit.rules.TestName |
currentTest |
private org.apache.hadoop.hbase.util.EnvironmentEdge |
ee |
private org.apache.hadoop.fs.FileSystem |
fs |
private org.apache.hadoop.fs.Path |
hbaseRootDir |
private static org.slf4j.Logger |
LOG |
private org.apache.hadoop.fs.Path |
logDir |
private String |
logName |
private org.apache.hadoop.fs.Path |
oldLogDir |
(package private) static HBaseTestingUtility |
TEST_UTIL |
private org.apache.hadoop.hbase.wal.WALFactory |
wals |
Constructor and Description |
---|
AbstractTestWALReplay() |
Modifier and Type | Method and Description |
---|---|
static List<org.apache.hadoop.hbase.client.Put> |
addRegionEdits(byte[] rowName,
byte[] family,
int count,
org.apache.hadoop.hbase.util.EnvironmentEdge ee,
org.apache.hadoop.hbase.regionserver.Region r,
String qualifierPrefix) |
private void |
addWALEdits(org.apache.hadoop.hbase.TableName tableName,
org.apache.hadoop.hbase.HRegionInfo hri,
byte[] rowName,
byte[] family,
int count,
org.apache.hadoop.hbase.util.EnvironmentEdge ee,
org.apache.hadoop.hbase.wal.WAL wal,
org.apache.hadoop.hbase.HTableDescriptor htd,
org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl mvcc,
NavigableMap<byte[],Integer> scopes) |
private org.apache.hadoop.hbase.HTableDescriptor |
createBasic1FamilyHTD(org.apache.hadoop.hbase.TableName tableName) |
private org.apache.hadoop.hbase.HRegionInfo |
createBasic3FamilyHRegionInfo(org.apache.hadoop.hbase.TableName tableName) |
private org.apache.hadoop.hbase.HTableDescriptor |
createBasic3FamilyHTD(org.apache.hadoop.hbase.TableName tableName) |
private org.apache.hadoop.hbase.regionserver.wal.FSWALEntry |
createFSWALEntry(org.apache.hadoop.hbase.HTableDescriptor htd,
org.apache.hadoop.hbase.HRegionInfo hri,
long sequence,
byte[] rowName,
byte[] family,
org.apache.hadoop.hbase.util.EnvironmentEdge ee,
org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl mvcc,
int index,
NavigableMap<byte[],Integer> scopes) |
private AbstractTestWALReplay.MockWAL |
createMockWAL() |
protected abstract 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.WALEdit |
createWALEdit(byte[] rowName,
byte[] family,
org.apache.hadoop.hbase.util.EnvironmentEdge ee,
int index) |
private org.apache.hadoop.hbase.wal.WALKeyImpl |
createWALKey(org.apache.hadoop.hbase.TableName tableName,
org.apache.hadoop.hbase.HRegionInfo hri,
org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl mvcc,
NavigableMap<byte[],Integer> scopes) |
private void |
deleteDir(org.apache.hadoop.fs.Path p) |
private int |
getScannedCount(org.apache.hadoop.hbase.regionserver.RegionScanner scanner) |
private org.apache.hadoop.fs.Path |
runWALSplit(org.apache.hadoop.conf.Configuration c) |
void |
setUp() |
static void |
setUpBeforeClass() |
void |
tearDown() |
static void |
tearDownAfterClass() |
void |
test2727()
Tests for hbase-2727.
|
void |
testCompactedBulkLoadedFiles()
HRegion test case that is made of a major compacted HFile (created with three bulk loaded
files) and an edit in the memstore.
|
void |
testDatalossWhenInputError()
testcase for https://issues.apache.org/jira/browse/HBASE-15252
|
private void |
testNameConflictWhenSplit(boolean largeFirst)
testcase for https://issues.apache.org/jira/browse/HBASE-14949.
|
void |
testNameConflictWhenSplit0() |
void |
testNameConflictWhenSplit1() |
void |
testRegionMadeOfBulkLoadedFilesOnly()
Test case of HRegion that is only made out of bulk loaded files.
|
void |
testReplayEditsAfterAbortingFlush()
Test that we could recover the data correctly after aborting flush.
|
void |
testReplayEditsAfterPartialFlush()
Test that we recover correctly when there is a failure in between the flushes.
|
void |
testReplayEditsAfterRegionMovedWithMultiCF()
n
|
void |
testReplayEditsWrittenIntoWAL()
Create an HRegion with the result of a WAL split and test we only see the good edits n
|
void |
testReplayEditsWrittenViaHRegion()
Test writing edits into an HRegion, closing it, splitting logs, opening Region again.
|
void |
testSequentialEditLogSeqNum() |
private void |
writerWALFile(org.apache.hadoop.fs.Path file,
List<org.apache.hadoop.hbase.regionserver.wal.FSWALEntry> entries) |
private static final org.slf4j.Logger LOG
static final HBaseTestingUtility TEST_UTIL
private final org.apache.hadoop.hbase.util.EnvironmentEdge ee
private org.apache.hadoop.fs.Path hbaseRootDir
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
public final org.junit.rules.TestName currentTest
public AbstractTestWALReplay()
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
public void testReplayEditsAfterRegionMovedWithMultiCF() throws Exception
Exception
public void test2727() throws Exception
Exception
public void testRegionMadeOfBulkLoadedFilesOnly() throws IOException, SecurityException, IllegalArgumentException, NoSuchFieldException, IllegalAccessException, InterruptedException
public void testCompactedBulkLoadedFiles() throws IOException, SecurityException, IllegalArgumentException, NoSuchFieldException, IllegalAccessException, InterruptedException
public void testReplayEditsWrittenViaHRegion() throws IOException, SecurityException, IllegalArgumentException, NoSuchFieldException, IllegalAccessException, InterruptedException
public void testReplayEditsAfterPartialFlush() throws IOException, SecurityException, IllegalArgumentException, NoSuchFieldException, IllegalAccessException, InterruptedException
public void testReplayEditsAfterAbortingFlush() throws IOException
IOException
private int getScannedCount(org.apache.hadoop.hbase.regionserver.RegionScanner scanner) throws IOException
IOException
public void testReplayEditsWrittenIntoWAL() throws Exception
Exception
public void testSequentialEditLogSeqNum() throws IOException
IOException
public void testDatalossWhenInputError() throws Exception
Exception
private void testNameConflictWhenSplit(boolean largeFirst) throws IOException, org.apache.hadoop.hbase.util.CommonFSUtils.StreamLacksCapabilityException
IOException
org.apache.hadoop.hbase.util.CommonFSUtils.StreamLacksCapabilityException
public void testNameConflictWhenSplit0() throws IOException, org.apache.hadoop.hbase.util.CommonFSUtils.StreamLacksCapabilityException
IOException
org.apache.hadoop.hbase.util.CommonFSUtils.StreamLacksCapabilityException
public void testNameConflictWhenSplit1() throws IOException, org.apache.hadoop.hbase.util.CommonFSUtils.StreamLacksCapabilityException
IOException
org.apache.hadoop.hbase.util.CommonFSUtils.StreamLacksCapabilityException
private org.apache.hadoop.hbase.HTableDescriptor createBasic1FamilyHTD(org.apache.hadoop.hbase.TableName tableName)
private AbstractTestWALReplay.MockWAL createMockWAL() throws IOException
IOException
private org.apache.hadoop.hbase.wal.WALKeyImpl createWALKey(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.HRegionInfo hri, org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl mvcc, NavigableMap<byte[],Integer> scopes)
private org.apache.hadoop.hbase.wal.WALEdit createWALEdit(byte[] rowName, byte[] family, org.apache.hadoop.hbase.util.EnvironmentEdge ee, int index)
private org.apache.hadoop.hbase.regionserver.wal.FSWALEntry createFSWALEntry(org.apache.hadoop.hbase.HTableDescriptor htd, org.apache.hadoop.hbase.HRegionInfo hri, long sequence, byte[] rowName, byte[] family, org.apache.hadoop.hbase.util.EnvironmentEdge ee, org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl mvcc, int index, NavigableMap<byte[],Integer> scopes) throws IOException
IOException
private void addWALEdits(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.HRegionInfo hri, byte[] rowName, byte[] family, int count, org.apache.hadoop.hbase.util.EnvironmentEdge ee, org.apache.hadoop.hbase.wal.WAL wal, org.apache.hadoop.hbase.HTableDescriptor htd, org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl mvcc, NavigableMap<byte[],Integer> scopes) throws IOException
IOException
public static List<org.apache.hadoop.hbase.client.Put> addRegionEdits(byte[] rowName, byte[] family, int count, org.apache.hadoop.hbase.util.EnvironmentEdge ee, org.apache.hadoop.hbase.regionserver.Region r, String qualifierPrefix) throws IOException
IOException
private org.apache.hadoop.hbase.HRegionInfo createBasic3FamilyHRegionInfo(org.apache.hadoop.hbase.TableName tableName)
private org.apache.hadoop.fs.Path runWALSplit(org.apache.hadoop.conf.Configuration c) throws IOException
IOException
private org.apache.hadoop.hbase.HTableDescriptor createBasic3FamilyHTD(org.apache.hadoop.hbase.TableName tableName)
private void writerWALFile(org.apache.hadoop.fs.Path file, List<org.apache.hadoop.hbase.regionserver.wal.FSWALEntry> entries) throws IOException, org.apache.hadoop.hbase.util.CommonFSUtils.StreamLacksCapabilityException
IOException
org.apache.hadoop.hbase.util.CommonFSUtils.StreamLacksCapabilityException
protected abstract org.apache.hadoop.hbase.wal.WAL createWAL(org.apache.hadoop.conf.Configuration c, org.apache.hadoop.fs.Path hbaseRootDir, String logName) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.