Class TestReplicationSourceManager
java.lang.Object
org.apache.hadoop.hbase.replication.regionserver.TestReplicationSourceManager
- Direct Known Subclasses:
TestReplicationSourceManagerZkImpl
An abstract class that tests ReplicationSourceManager. Classes that extend this class should set
up the proper config for this class and initialize the proper cluster using HBaseTestingUtility.
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
(package private) static class
(package private) static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
protected static org.apache.hadoop.conf.Configuration
protected static final byte[]
protected static final byte[]
protected static org.apache.hadoop.fs.FileSystem
protected static org.apache.hadoop.hbase.HRegionInfo
protected static org.apache.hadoop.hbase.HTableDescriptor
protected static CountDownLatch
protected static final org.slf4j.Logger
protected static org.apache.hadoop.fs.Path
protected static org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager
protected static org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager
protected static org.apache.hadoop.fs.Path
protected static final byte[]
protected static final byte[]
protected static org.apache.hadoop.hbase.replication.regionserver.Replication
protected static NavigableMap<byte[],
Integer> protected static final String
protected static final org.apache.hadoop.hbase.TableName
org.junit.rules.TestName
protected static HBaseTestingUtility
protected static org.apache.hadoop.hbase.zookeeper.ZKWatcher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
addPeerAndWait
(String peerId, org.apache.hadoop.hbase.replication.ReplicationPeerConfig peerConfig, boolean waitForSource) Add a peer and wait for it to initializeprivate void
private org.apache.hadoop.hbase.wal.WALEdit
getBulkLoadWALEdit
(NavigableMap<byte[], Integer> scope) private static org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationSourceSource
private static org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager
private static long
private void
removePeerAndWait
(String peerId) Remove a peer and wait for it to get cleaned upvoid
setUp()
protected static void
void
tearDown()
static void
void
void
void
void
void
void
Test for HBASE-9038, Replication.scopeWALEdits would NPE if it wasn't filtering out the compaction WALEdit.void
void
void
Test whether calling removePeer() on a ReplicationSourceManager that failed on initializing the corresponding ReplicationSourceInterface correctly cleans up the corresponding replication queue and ReplicationPeer.void
void
private static void
waitPeer
(String peerId, org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager manager, boolean waitForSource)
-
Field Details
-
CLASS_RULE
-
LOG
-
conf
-
utility
-
replication
-
manager
-
managerOfCluster
protected static org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager managerOfCluster -
zkw
-
htd
-
hri
-
r1
-
r2
-
f1
-
f2
-
test
-
slaveId
- See Also:
-
fs
-
oldLogDir
-
logDir
-
latch
-
files
-
scopes
-
testName
-
-
Constructor Details
-
TestReplicationSourceManager
public TestReplicationSourceManager()
-
-
Method Details
-
setupZkAndReplication
- Throws:
Exception
-
getManagerFromCluster
private static org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager getManagerFromCluster() -
tearDownAfterClass
- Throws:
Exception
-
cleanLogDir
- Throws:
IOException
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
testLogRoll
- Throws:
Exception
-
testClaimQueues
- Throws:
Exception
-
testCleanupFailoverQueues
- Throws:
Exception
-
testCleanupUnknownPeerZNode
- Throws:
Exception
-
testCompactionWALEdits
Test for HBASE-9038, Replication.scopeWALEdits would NPE if it wasn't filtering out the compaction WALEdit.- Throws:
Exception
-
testBulkLoadWALEditsWithoutBulkLoadReplicationEnabled
- Throws:
Exception
-
testBulkLoadWALEdits
- Throws:
Exception
-
testPeerRemovalCleanup
Test whether calling removePeer() on a ReplicationSourceManager that failed on initializing the corresponding ReplicationSourceInterface correctly cleans up the corresponding replication queue and ReplicationPeer. See HBASE-16096.- Throws:
Exception
-
getGlobalSource
private static org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationSourceSource getGlobalSource() throws Exception- Throws:
Exception
-
getSizeOfLatestPath
-
testRemovePeerMetricsCleanup
- Throws:
Exception
-
testDisablePeerMetricsCleanup
- Throws:
Exception
-
addPeerAndWait
private void addPeerAndWait(String peerId, org.apache.hadoop.hbase.replication.ReplicationPeerConfig peerConfig, boolean waitForSource) throws Exception Add a peer and wait for it to initialize- Parameters:
waitForSource
- Whether to wait for replication source to initialize- Throws:
Exception
-
waitPeer
-
removePeerAndWait
Remove a peer and wait for it to get cleaned up- Throws:
Exception
-
testSameWALPrefix
- Throws:
IOException
-