public abstract class TestReplicationSourceManager extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
TestReplicationSourceManager.DummyNodeFailoverWorker |
(package private) static class |
TestReplicationSourceManager.DummyServer |
(package private) static class |
TestReplicationSourceManager.FailInitializeDummyReplicationSource |
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
protected static org.apache.hadoop.conf.Configuration |
conf |
protected static byte[] |
f1 |
protected static byte[] |
f2 |
protected static List<String> |
files |
protected static org.apache.hadoop.fs.FileSystem |
fs |
protected static org.apache.hadoop.hbase.HRegionInfo |
hri |
protected static org.apache.hadoop.hbase.HTableDescriptor |
htd |
protected static CountDownLatch |
latch |
protected static org.slf4j.Logger |
LOG |
protected static org.apache.hadoop.fs.Path |
logDir |
protected static org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager |
manager |
protected static org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager |
managerOfCluster |
protected static org.apache.hadoop.fs.Path |
oldLogDir |
protected static byte[] |
r1 |
protected static byte[] |
r2 |
protected static org.apache.hadoop.hbase.replication.regionserver.Replication |
replication |
protected static NavigableMap<byte[],Integer> |
scopes |
protected static String |
slaveId |
protected static org.apache.hadoop.hbase.TableName |
test |
org.junit.rules.TestName |
testName |
protected static HBaseTestingUtility |
utility |
protected static org.apache.hadoop.hbase.zookeeper.ZKWatcher |
zkw |
Constructor and Description |
---|
TestReplicationSourceManager() |
Modifier and Type | Method and Description |
---|---|
private void |
addPeerAndWait(String peerId,
org.apache.hadoop.hbase.replication.ReplicationPeerConfig peerConfig,
boolean waitForSource)
Add a peer and wait for it to initialize
|
private void |
cleanLogDir() |
private org.apache.hadoop.hbase.wal.WALEdit |
getBulkLoadWALEdit(NavigableMap<byte[],Integer> scope) |
private static org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationSourceSource |
getGlobalSource() |
private static org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager |
getManagerFromCluster() |
private static long |
getSizeOfLatestPath() |
private void |
removePeerAndWait(String peerId)
Remove a peer and wait for it to get cleaned up
|
void |
setUp() |
protected static void |
setupZkAndReplication() |
void |
tearDown() |
static void |
tearDownAfterClass() |
void |
testBulkLoadWALEdits() |
void |
testBulkLoadWALEditsWithoutBulkLoadReplicationEnabled() |
void |
testClaimQueues() |
void |
testCleanupFailoverQueues() |
void |
testCleanupUnknownPeerZNode() |
void |
testCompactionWALEdits()
Test for HBASE-9038, Replication.scopeWALEdits would NPE if it wasn't filtering out the
compaction WALEdit.
|
void |
testLogRoll() |
void |
testPeerRemovalCleanup()
Test whether calling removePeer() on a ReplicationSourceManager that failed on initializing the
corresponding ReplicationSourceInterface correctly cleans up the corresponding
replication queue and ReplicationPeer.
|
void |
testRemovePeerMetricsCleanup() |
private static void |
waitPeer(String peerId,
org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager manager,
boolean waitForSource) |
public static final HBaseClassTestRule CLASS_RULE
protected static final org.slf4j.Logger LOG
protected static org.apache.hadoop.conf.Configuration conf
protected static HBaseTestingUtility utility
protected static org.apache.hadoop.hbase.replication.regionserver.Replication replication
protected static org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager manager
protected static org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager managerOfCluster
protected static org.apache.hadoop.hbase.zookeeper.ZKWatcher zkw
protected static org.apache.hadoop.hbase.HTableDescriptor htd
protected static org.apache.hadoop.hbase.HRegionInfo hri
protected static final byte[] r1
protected static final byte[] r2
protected static final byte[] f1
protected static final byte[] f2
protected static final org.apache.hadoop.hbase.TableName test
protected static final String slaveId
protected static org.apache.hadoop.fs.FileSystem fs
protected static org.apache.hadoop.fs.Path oldLogDir
protected static org.apache.hadoop.fs.Path logDir
protected static CountDownLatch latch
protected static NavigableMap<byte[],Integer> scopes
public org.junit.rules.TestName testName
public TestReplicationSourceManager()
protected static void setupZkAndReplication() throws Exception
Exception
private static org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager getManagerFromCluster()
public static void tearDownAfterClass() throws Exception
Exception
private void cleanLogDir() throws IOException
IOException
public void testLogRoll() throws Exception
Exception
public void testClaimQueues() throws Exception
Exception
public void testCleanupFailoverQueues() throws Exception
Exception
public void testCleanupUnknownPeerZNode() throws Exception
Exception
public void testCompactionWALEdits() throws Exception
Exception
public void testBulkLoadWALEditsWithoutBulkLoadReplicationEnabled() throws Exception
Exception
public void testBulkLoadWALEdits() throws Exception
Exception
public void testPeerRemovalCleanup() throws Exception
Exception
private static org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationSourceSource getGlobalSource() throws Exception
Exception
private static long getSizeOfLatestPath()
public void testRemovePeerMetricsCleanup() throws Exception
Exception
private void addPeerAndWait(String peerId, org.apache.hadoop.hbase.replication.ReplicationPeerConfig peerConfig, boolean waitForSource) throws Exception
peerId
- peerConfig
- waitForSource
- Whether to wait for replication source to initializeException
private static void waitPeer(String peerId, org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager manager, boolean waitForSource)
private void removePeerAndWait(String peerId) throws Exception
peerId
- Exception
private org.apache.hadoop.hbase.wal.WALEdit getBulkLoadWALEdit(NavigableMap<byte[],Integer> scope)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.