Class TestReplicationEmptyWALRecovery
java.lang.Object
org.apache.hadoop.hbase.replication.TestReplicationBase
org.apache.hadoop.hbase.replication.TestReplicationEmptyWALRecovery
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.replication.TestReplicationBase
TestReplicationBase.ReplicationEndpointTest
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
(package private) static final org.apache.hadoop.hbase.client.RegionInfo
(package private) org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl
(package private) NavigableMap<byte[],
Integer> Fields inherited from class org.apache.hadoop.hbase.replication.TestReplicationBase
admin, CONF_WITH_LOCALFS, CONF1, CONF2, connection1, connection2, famName, hbaseAdmin, htable1, htable2, NB_RETRIES, NB_ROWS_IN_BATCH, NB_ROWS_IN_BIG_BATCH, noRepfamName, NUM_SLAVES1, NUM_SLAVES2, PEER_ID2, replicateCount, replicatedEntries, row, SLEEP_TIME, tableName, UTIL1, UTIL2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
appendEntriesToWal
(int numEntries, org.apache.hadoop.hbase.wal.WAL wal) protected org.apache.hadoop.hbase.wal.WALKeyImpl
private void
injectEmptyWAL
(int numRs, List<org.apache.hadoop.fs.Path> emptyWalPaths) private void
rollWalsAndWaitForDeque
(int numRs) void
setUp()
void
void
Test empty WAL along with non empty WALs in the same batch.void
Test empty WAL along with non empty WALs in the same batch.void
This test make sure we replicate all the enties from the non empty WALs which are surrounding the empty WALsprivate void
verifyNumberOfLogsInQueue
(int numQueues, int numRs) private void
waitForLogAdvance
(int numRs) Waits until there is only one log(the current writing one) in the replication queueMethods inherited from class org.apache.hadoop.hbase.replication.TestReplicationBase
addPeer, cleanUp, configureClusters, createTable, isSerialPeer, loadData, loadData, removePeer, restartSourceCluster, restartTargetHBaseCluster, runSimplePutDeleteTest, runSmallBatchTest, setUpBase, setUpBeforeClass, setupConfig, tearDownAfterClass, tearDownBase, waitForReplication, waitForReplication
-
Field Details
-
mvcc
org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl mvcc -
info
-
scopes
NavigableMap<byte[],Integer> scopes -
CLASS_RULE
-
-
Constructor Details
-
TestReplicationEmptyWALRecovery
public TestReplicationEmptyWALRecovery()
-
-
Method Details
-
setUp
- Throws:
IOException
InterruptedException
-
waitForLogAdvance
Waits until there is only one log(the current writing one) in the replication queue- Parameters:
numRs
- number of region servers
-
verifyNumberOfLogsInQueue
-
testEmptyWALRecovery
- Throws:
Exception
-
testReplicationOfEmptyWALFollowingNonEmptyWAL
Test empty WAL along with non empty WALs in the same batch. This test is to make sure when we see the empty and handle the EOF exception, we are able to ship the previous batch of entries without loosing it. This test also tests the number of batches shipped- Throws:
Exception
- throws any exception
-
testReplicationOfEmptyWALFollowedByNonEmptyWAL
Test empty WAL along with non empty WALs in the same batch. This test is to make sure when we see the empty WAL and handle the EOF exception, we are able to proceed with next batch and replicate it properly without missing data.- Throws:
Exception
- throws any exception
-
testReplicationOfEmptyWALSurroundedNonEmptyWAL
This test make sure we replicate all the enties from the non empty WALs which are surrounding the empty WALs- Throws:
Exception
- throws exception
-
injectEmptyWAL
private void injectEmptyWAL(int numRs, List<org.apache.hadoop.fs.Path> emptyWalPaths) throws IOException - Throws:
IOException
-
getWalKeyImpl
-
rollWalsAndWaitForDeque
- Throws:
IOException
-
appendEntriesToWal
private void appendEntriesToWal(int numEntries, org.apache.hadoop.hbase.wal.WAL wal) throws IOException - Throws:
IOException
-