public class ReplicationSinkManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ReplicationSinkManager.SinkPeer
Wraps a replication region server sink to provide the ability to identify
it.
|
Constructor and Description |
---|
ReplicationSinkManager(HConnection conn,
String peerClusterId,
ReplicationPeers replicationPeers,
org.apache.hadoop.conf.Configuration conf)
Instantiate for a single replication peer cluster.
|
Modifier and Type | Method and Description |
---|---|
ReplicationSinkManager.SinkPeer |
getReplicationSink()
Get a randomly-chosen replication sink to replicate to.
|
void |
reportBadSink(ReplicationSinkManager.SinkPeer sinkPeer)
Report a
SinkPeer as being bad (i.e. |
public ReplicationSinkManager(HConnection conn, String peerClusterId, ReplicationPeers replicationPeers, org.apache.hadoop.conf.Configuration conf)
conn
- connection to the peer clusterpeerClusterId
- identifier of the peer clusterreplicationPeers
- manages peer clusters being replicated toconf
- HBase configuration, used for determining replication source ratio and bad peer
thresholdpublic ReplicationSinkManager.SinkPeer getReplicationSink() throws IOException
IOException
public void reportBadSink(ReplicationSinkManager.SinkPeer sinkPeer)
SinkPeer
as being bad (i.e. an attempt to replicate to it
failed). If a single SinkPeer is reported as bad more than
replication.bad.sink.threshold times, it will be removed
from the pool of potential replication targets.sinkPeer
- The SinkPeer that had a failed replication attempt on itCopyright © 2014 The Apache Software Foundation. All rights reserved.