public abstract class TestBasicWALEntryStream extends WALEntryStreamTestBase
Modifier and Type | Class and Description |
---|---|
static class |
TestBasicWALEntryStream.FailingWALEntryFilter |
WALEntryStreamTestBase.PathWatcher, WALEntryStreamTestBase.WALEntryStreamWithRetries
cluster, CONF, fakeWalGroupId, family, fs, info, log, logQueue, mvcc, pathWatcher, qualifier, scopes, tableName, TEST_TIMEOUT_MS, TEST_UTIL, tn
Constructor and Description |
---|
TestBasicWALEntryStream() |
Modifier and Type | Method and Description |
---|---|
private void |
appendEntries(org.apache.hadoop.hbase.wal.WALProvider.Writer writer,
int numEntries) |
private void |
appendEntriesToLogAndSync(int count) |
private void |
appendToLog(String key) |
private org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceWALReader |
createReader(boolean recovered,
org.apache.hadoop.conf.Configuration conf) |
private org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceWALReader |
createReaderWithBadReplicationFilter(int numFailures,
org.apache.hadoop.conf.Configuration conf) |
private org.apache.hadoop.hbase.replication.WALEntryFilter |
getDummyFilter() |
private org.apache.hadoop.hbase.replication.WALEntryFilter |
getIntermittentFailingFilter(int numFailuresInFilter) |
private PriorityBlockingQueue<org.apache.hadoop.fs.Path> |
getQueue() |
private String |
getRow(org.apache.hadoop.hbase.wal.WAL.Entry entry) |
private org.apache.hadoop.hbase.wal.WALEdit |
getWALEdit(String row) |
private org.apache.hadoop.hbase.replication.regionserver.ReplicationSource |
mockReplicationSource(boolean recovered,
org.apache.hadoop.conf.Configuration conf) |
void |
setUp() |
void |
testAppendsWithRolls()
Tests basic reading of log appends
|
void |
testCleanClosedWALs()
Tests that wals are closed cleanly and we read the trailer when we remove wal from
WALEntryStream.
|
void |
testEmptyStream() |
void |
testEOFExceptionForRecoveredQueue() |
void |
testEOFExceptionForRecoveredQueueWithMultipleLogs() |
void |
testEOFExceptionInOldWALsDirectory()
Tests that we handle EOFException properly if the wal has moved to oldWALs directory.
|
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 |
testReplicationSourceWALReaderWithFailingFilter() |
void |
testReplicationSourceWALReaderWrongPosition() |
void |
testResumeStreamingFromPosition() |
void |
testSizeOfLogQueue()
Tests size of log queue is incremented and decremented properly.
|
void |
testWALKeySerialization() |
appendToLog, appendToLogAndSync, appendToLogAndSync, getWALEdits, initWAL, startCluster, tearDown, tearDownAfterClass
public TestBasicWALEntryStream()
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)
private org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceWALReader createReaderWithBadReplicationFilter(int numFailures, org.apache.hadoop.conf.Configuration conf)
public void testReplicationSourceWALReader() throws Exception
Exception
public void testReplicationSourceWALReaderWithFailingFilter() 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 org.apache.hadoop.hbase.wal.WALEdit getWALEdit(String row)
private org.apache.hadoop.hbase.replication.WALEntryFilter getDummyFilter()
private org.apache.hadoop.hbase.replication.WALEntryFilter getIntermittentFailingFilter(int numFailuresInFilter)
public void testReadBeyondCommittedLength() throws IOException, InterruptedException
IOException
InterruptedException
public void testEOFExceptionForRecoveredQueue() throws Exception
Exception
public void testEOFExceptionForRecoveredQueueWithMultipleLogs() throws Exception
Exception
private PriorityBlockingQueue<org.apache.hadoop.fs.Path> getQueue()
private void appendEntries(org.apache.hadoop.hbase.wal.WALProvider.Writer writer, int numEntries) throws IOException
IOException
public void testSizeOfLogQueue() throws Exception
Exception
public void testCleanClosedWALs() throws Exception
Exception
public void testEOFExceptionInOldWALsDirectory() throws Exception
Exception
- exceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.