public class TestWALEntryStream extends Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
TestWALEntryStream.PathWatcher |
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static org.apache.hadoop.hdfs.MiniDFSCluster |
cluster |
private static org.apache.hadoop.conf.Configuration |
CONF |
private static byte[] |
family |
private static org.apache.hadoop.fs.FileSystem |
fs |
private static org.apache.hadoop.hbase.client.RegionInfo |
info |
private org.apache.hadoop.hbase.wal.WAL |
log |
private org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl |
mvcc |
private TestWALEntryStream.PathWatcher |
pathWatcher |
private static byte[] |
qualifier |
private static NavigableMap<byte[],Integer> |
scopes |
private static org.apache.hadoop.hbase.TableName |
tableName |
private static HBaseTestingUtility |
TEST_UTIL |
org.junit.rules.TestName |
tn |
(package private) PriorityBlockingQueue<org.apache.hadoop.fs.Path> |
walQueue |
Constructor and Description |
---|
TestWALEntryStream() |
Modifier and Type | Method and Description |
---|---|
private void |
appendEntriesToLogAndSync(int count) |
private long |
appendToLog(int count) |
private void |
appendToLog(String key) |
private void |
appendToLogAndSync() |
private void |
appendToLogAndSync(int count) |
private org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceWALReader |
createReader(boolean recovered,
org.apache.hadoop.conf.Configuration conf) |
private org.apache.hadoop.hbase.replication.WALEntryFilter |
getDummyFilter() |
private String |
getRow(org.apache.hadoop.hbase.wal.WAL.Entry entry) |
private static NavigableMap<byte[],Integer> |
getScopes() |
private org.apache.hadoop.hbase.wal.WALEdit |
getWALEdit(String row) |
private org.apache.hadoop.hbase.wal.WALEdit |
getWALEdits(int count) |
private org.apache.hadoop.hbase.replication.regionserver.ReplicationSource |
mockReplicationSource(boolean recovered,
org.apache.hadoop.conf.Configuration conf) |
void |
setUp() |
static void |
setUpBeforeClass() |
void |
tearDown() |
static void |
tearDownAfterClass() |
void |
testAppendsWithRolls()
Tests basic reading of log appends
|
void |
testDifferentCounts() |
void |
testEmptyStream() |
void |
testLogrollWhileStreaming()
Tests that if after a stream is opened, more entries come in and then the log is rolled, we
don't mistakenly dequeue the current log thinking we're done with it
|
void |
testNewEntriesWhileStreaming()
Tests that if writes come in while we have a stream open, we shouldn't miss them
|
void |
testPosition()
Tests that if we stop before hitting the end of a stream, we can continue where we left off
using the last position
|
void |
testReadBeyondCommittedLength() |
void |
testReplicationSourceWALReader() |
void |
testReplicationSourceWALReaderDisabled() |
void |
testReplicationSourceWALReaderRecovered() |
void |
testReplicationSourceWALReaderWrongPosition() |
void |
testResumeStreamingFromPosition() |
void |
testWALKeySerialization() |
public static final HBaseClassTestRule CLASS_RULE
private static HBaseTestingUtility TEST_UTIL
private static org.apache.hadoop.conf.Configuration CONF
private static org.apache.hadoop.fs.FileSystem fs
private static org.apache.hadoop.hdfs.MiniDFSCluster cluster
private static final org.apache.hadoop.hbase.TableName tableName
private static final byte[] family
private static final byte[] qualifier
private static final org.apache.hadoop.hbase.client.RegionInfo info
private static final NavigableMap<byte[],Integer> scopes
private org.apache.hadoop.hbase.wal.WAL log
PriorityBlockingQueue<org.apache.hadoop.fs.Path> walQueue
private TestWALEntryStream.PathWatcher pathWatcher
public org.junit.rules.TestName tn
private final org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl mvcc
public TestWALEntryStream()
private static NavigableMap<byte[],Integer> getScopes()
public static void setUpBeforeClass() throws Exception
Exception
public static void tearDownAfterClass() throws Exception
Exception
public void testDifferentCounts() throws Exception
Exception
public void testAppendsWithRolls() throws Exception
Exception
public void testLogrollWhileStreaming() throws Exception
Exception
public void testNewEntriesWhileStreaming() throws Exception
Exception
public void testResumeStreamingFromPosition() throws Exception
Exception
public void testPosition() throws Exception
Exception
public void testEmptyStream() throws Exception
Exception
public void testWALKeySerialization() throws Exception
Exception
private org.apache.hadoop.hbase.replication.regionserver.ReplicationSource mockReplicationSource(boolean recovered, org.apache.hadoop.conf.Configuration conf)
private org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceWALReader createReader(boolean recovered, org.apache.hadoop.conf.Configuration conf)
public void testReplicationSourceWALReader() throws Exception
Exception
public void testReplicationSourceWALReaderRecovered() throws Exception
Exception
public void testReplicationSourceWALReaderWrongPosition() throws Exception
Exception
public void testReplicationSourceWALReaderDisabled() throws IOException, InterruptedException, ExecutionException
private void appendToLog(String key) throws IOException
IOException
private void appendEntriesToLogAndSync(int count) throws IOException
IOException
private void appendToLogAndSync() throws IOException
IOException
private void appendToLogAndSync(int count) throws IOException
IOException
private long appendToLog(int count) throws IOException
IOException
private org.apache.hadoop.hbase.wal.WALEdit getWALEdits(int count)
private org.apache.hadoop.hbase.wal.WALEdit getWALEdit(String row)
private org.apache.hadoop.hbase.replication.WALEntryFilter getDummyFilter()
public void testReadBeyondCommittedLength() throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.