@InterfaceAudience.Private
public interface ReplicationPeers
Modifier and Type | Method and Description |
---|---|
void |
addPeer(String peerId,
String clusterKey)
Add a new remote slave cluster for replication.
|
boolean |
connectToPeer(String peerId)
Attempt to connect to a new remote slave cluster.
|
void |
disablePeer(String peerId)
Stop the replication to the specified remote slave cluster.
|
void |
disconnectFromPeer(String peerId)
Disconnect from a remote slave cluster.
|
void |
enablePeer(String peerId)
Restart the replication to the specified remote slave cluster.
|
Map<String,String> |
getAllPeerClusterKeys()
List the cluster keys of all remote slave clusters (whether they are enabled/disabled or
connected/disconnected).
|
List<String> |
getAllPeerIds()
List the peer ids of all remote slave clusters (whether they are enabled/disabled or
connected/disconnected).
|
Set<String> |
getConnectedPeers()
Get a set of all connected remote slave clusters.
|
org.apache.hadoop.conf.Configuration |
getPeerConf(String peerId)
Returns the configuration needed to talk to the remote slave cluster.
|
UUID |
getPeerUUID(String peerId)
Returns the UUID of the provided peer id.
|
List<ServerName> |
getRegionServersOfConnectedPeer(String peerId)
Returns all region servers from given connected remote slave cluster.
|
boolean |
getStatusOfConnectedPeer(String peerId)
Get the replication status for the specified connected remote slave cluster.
|
boolean |
getStatusOfPeerFromBackingStore(String peerId)
Get the replication status for the specified remote slave cluster, which doesn't
have to be connected.
|
long |
getTimestampOfLastChangeToPeer(String peerId)
Get the timestamp of the last change in composition of a given peer cluster.
|
void |
init()
Initialize the ReplicationPeers interface.
|
void |
removePeer(String peerId)
Removes a remote slave cluster and stops the replication to it.
|
void init() throws ReplicationException
ReplicationException
void addPeer(String peerId, String clusterKey) throws ReplicationException
peerId
- a short that identifies the clusterclusterKey
- the concatenation of the slave cluster's:
hbase.zookeeper.quorum:hbase.zookeeper.property.clientPort:zookeeper.znode.parentReplicationException
void removePeer(String peerId) throws ReplicationException
peerId
- a short that identifies the clusterReplicationException
void enablePeer(String peerId) throws ReplicationException
peerId
- a short that identifies the clusterReplicationException
void disablePeer(String peerId) throws ReplicationException
peerId
- a short that identifies the clusterReplicationException
boolean getStatusOfConnectedPeer(String peerId)
getStatusOfPeerFromBackingStore(String)
if reading the state after enabling or disabling it.peerId
- a short that identifies the clusterboolean getStatusOfPeerFromBackingStore(String peerId) throws ReplicationException
peerId
- a short that identifies the clusterIOException
- Throws if there's an error contacting the storeReplicationException
Set<String> getConnectedPeers()
Map<String,String> getAllPeerClusterKeys()
List<String> getAllPeerIds()
boolean connectToPeer(String peerId) throws ReplicationException
peerId
- a short that identifies the clusterReplicationException
void disconnectFromPeer(String peerId)
peerId
- a short that identifies the clusterList<ServerName> getRegionServersOfConnectedPeer(String peerId)
peerId
- a short that identifies the clusterlong getTimestampOfLastChangeToPeer(String peerId)
peerId
- identifier of the peer cluster for which the timestamp is requestedUUID getPeerUUID(String peerId)
peerId
- the peer's ID that will be converted into a UUIDorg.apache.hadoop.conf.Configuration getPeerConf(String peerId) throws ReplicationException
peerId
- a short that identifies the clusterReplicationException
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.