Class TestReplicationEmptyWALRecovery
java.lang.Object
org.apache.hadoop.hbase.replication.TestReplicationBaseNoBeforeAll
org.apache.hadoop.hbase.replication.TestReplicationBase
org.apache.hadoop.hbase.replication.TestReplicationEmptyWALRecovery
@Tag("org.apache.hadoop.hbase.testclassification.ReplicationTests") @Tag("org.apache.hadoop.hbase.testclassification.LargeTests")
public class TestReplicationEmptyWALRecovery
extends TestReplicationBase
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.replication.TestReplicationBaseNoBeforeAll
TestReplicationBaseNoBeforeAll.ReplicationEndpointTest -
Field Summary
FieldsModifier and TypeFieldDescription(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.TestReplicationBaseNoBeforeAll
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidappendEntriesToWal(int numEntries, org.apache.hadoop.hbase.wal.WAL wal) protected org.apache.hadoop.hbase.wal.WALKeyImplprivate voidinjectEmptyWAL(int numRs, List<org.apache.hadoop.fs.Path> emptyWalPaths) private voidrollWalsAndWaitForDeque(int numRs) voidsetUp()voidvoidTest empty WAL along with non empty WALs in the same batch.voidTest empty WAL along with non empty WALs in the same batch.voidThis test make sure we replicate all the enties from the non empty WALs which are surrounding the empty WALsprivate voidverifyNumberOfLogsInQueue(int numQueues, int numRs) private voidwaitForLogAdvance(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
setUpBeforeClassMethods inherited from class org.apache.hadoop.hbase.replication.TestReplicationBaseNoBeforeAll
addPeer, addPeer, cleanUp, configureClusters, createTable, getClusterKey, isSerialPeer, isSyncPeer, loadData, loadData, removePeer, removePeer, restartSourceCluster, restartTargetHBaseCluster, runSimplePutDeleteTest, runSmallBatchTest, setUpBase, setupConfig, startClusters, stopAllRegionServers, tearDownAfterClass, tearDownBase, waitForReplication, waitForReplication
-
Field Details
-
mvcc
org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl mvcc -
info
-
scopes
NavigableMap<byte[],Integer> scopes
-
-
Constructor Details
-
TestReplicationEmptyWALRecovery
public TestReplicationEmptyWALRecovery()
-
-
Method Details
-
setUp
- Throws:
IOExceptionInterruptedException
-
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
-