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
FieldsModifier and TypeFieldDescriptionprotected static byte[]protected static byte[]protected static Stringprotected static org.apache.hadoop.fs.Pathprotected static org.apache.hadoop.fs.Pathprotected static org.apache.hadoop.hbase.TableNameprotected static final HBaseTestingUtilprotected static final HBaseTestingUtilprotected static final HBaseZKTestingUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidassertRejection(Throwable error) protected final org.apache.hadoop.fs.PathgetRemoteWALDir(org.apache.hadoop.fs.Path remoteWALDir, String peerId) protected final org.apache.hadoop.fs.PathgetRemoteWALDir(org.apache.hadoop.hbase.master.MasterFileSystem mfs, String peerId) protected final org.apache.hadoop.fs.PathgetReplayRemoteWALs(org.apache.hadoop.fs.Path remoteWALDir, String peerId) protected static voidinitTestingUtility(HBaseTestingUtil util, String zkParent) static voidsetUp()private static voidshutdown(HBaseTestingUtil util) static voidtearDown()protected final voidverify(HBaseTestingUtil util, int start, int end) protected final voidverifyNotReplicatedThroughRegion(HBaseTestingUtil util, int start, int end) protected final voidverifyRemovedPeer(String peerId, org.apache.hadoop.fs.Path remoteWALDir, HBaseTestingUtil utility) protected final voidverifyReplicationRequestRejection(HBaseTestingUtil utility, boolean expectedRejection) protected final voidverifyThroughRegion(HBaseTestingUtil util, int start, int end) protected final voidwaitUntilDeleted(HBaseTestingUtil util, org.apache.hadoop.fs.Path remoteWAL) protected final voidwaitUntilReplicationDone(HBaseTestingUtil util, int end) protected final voidwrite(HBaseTestingUtil util, int start, int end) protected final voidwriteAndVerifyReplication(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
-