Class SyncReplicationTestBase
java.lang.Object
org.apache.hadoop.hbase.replication.SyncReplicationTestBase
- Direct Known Subclasses:
SyncReplicationActiveTestBase
,SyncReplicationStandbyTestBase
,TestDrainReplicationQueuesForStandBy
,TestRegisterPeerWorkerWhenRestarting
,TestSerialSyncReplication
,TestSyncReplicationMoreLogsInLocalCopyToRemote
,TestSyncReplicationMoreLogsInLocalGiveUpSplitting
,TestSyncReplicationNewRSJoinBetweenRefreshes
,TestSyncReplicationRemoveRemoteWAL
,TestSyncReplicationShipperQuit
,TestSyncReplicationStandbyKillMaster
,TestSyncReplicationStandbyKillRS
,TestTransitPeerSyncReplicationStateProcedureRetry
Base class for testing sync replication.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static byte[]
protected static byte[]
protected static String
protected static org.apache.hadoop.fs.Path
protected static org.apache.hadoop.fs.Path
protected static org.apache.hadoop.hbase.TableName
protected static final HBaseTestingUtil
protected static final HBaseTestingUtil
protected static final HBaseZKTestingUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
assertRejection
(Throwable error) protected final org.apache.hadoop.fs.Path
getRemoteWALDir
(org.apache.hadoop.fs.Path remoteWALDir, String peerId) protected final org.apache.hadoop.fs.Path
getRemoteWALDir
(org.apache.hadoop.hbase.master.MasterFileSystem mfs, String peerId) protected final org.apache.hadoop.fs.Path
getReplayRemoteWALs
(org.apache.hadoop.fs.Path remoteWALDir, String peerId) protected static void
initTestingUtility
(HBaseTestingUtil util, String zkParent) static void
setUp()
private static void
shutdown
(HBaseTestingUtil util) static void
tearDown()
protected final void
verify
(HBaseTestingUtil util, int start, int end) protected final void
verifyNotReplicatedThroughRegion
(HBaseTestingUtil util, int start, int end) protected final void
verifyRemovedPeer
(String peerId, org.apache.hadoop.fs.Path remoteWALDir, HBaseTestingUtil utility) protected final void
verifyReplicationRequestRejection
(HBaseTestingUtil utility, boolean expectedRejection) protected final void
verifyThroughRegion
(HBaseTestingUtil util, int start, int end) protected final void
waitUntilDeleted
(HBaseTestingUtil util, org.apache.hadoop.fs.Path remoteWAL) protected final void
waitUntilReplicationDone
(HBaseTestingUtil util, int end) protected final void
write
(HBaseTestingUtil util, int start, int end) protected final void
writeAndVerifyReplication
(HBaseTestingUtil util1, HBaseTestingUtil util2, int start, int end)
-
Field Details
-
ZK_UTIL
-
UTIL1
-
UTIL2
-
TABLE_NAME
-
CF
-
CQ
-
PEER_ID
-
REMOTE_WAL_DIR1
-
REMOTE_WAL_DIR2
-
-
Constructor Details
-
SyncReplicationTestBase
public SyncReplicationTestBase()
-
-
Method Details
-
initTestingUtility
-
setUp
- Throws:
Exception
-
shutdown
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
write
- Throws:
IOException
-
verify
- Throws:
IOException
-
verifyThroughRegion
protected final void verifyThroughRegion(HBaseTestingUtil util, int start, int end) throws IOException - Throws:
IOException
-
verifyNotReplicatedThroughRegion
protected final void verifyNotReplicatedThroughRegion(HBaseTestingUtil util, int start, int end) throws IOException - Throws:
IOException
-
waitUntilReplicationDone
- Throws:
Exception
-
writeAndVerifyReplication
protected final void writeAndVerifyReplication(HBaseTestingUtil util1, HBaseTestingUtil util2, int start, int end) throws Exception - Throws:
Exception
-
getRemoteWALDir
protected final org.apache.hadoop.fs.Path getRemoteWALDir(org.apache.hadoop.hbase.master.MasterFileSystem mfs, String peerId) -
getRemoteWALDir
protected final org.apache.hadoop.fs.Path getRemoteWALDir(org.apache.hadoop.fs.Path remoteWALDir, String peerId) -
getReplayRemoteWALs
protected final org.apache.hadoop.fs.Path getReplayRemoteWALs(org.apache.hadoop.fs.Path remoteWALDir, String peerId) -
verifyRemovedPeer
protected final void verifyRemovedPeer(String peerId, org.apache.hadoop.fs.Path remoteWALDir, HBaseTestingUtil utility) throws Exception - Throws:
Exception
-
assertRejection
-
verifyReplicationRequestRejection
protected final void verifyReplicationRequestRejection(HBaseTestingUtil utility, boolean expectedRejection) throws Exception - Throws:
Exception
-
waitUntilDeleted
protected final void waitUntilDeleted(HBaseTestingUtil util, org.apache.hadoop.fs.Path remoteWAL) throws Exception - Throws:
Exception
-