|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@InterfaceAudience.Private public interface ReplicationPeers
This provides an interface for maintaining a set of peer clusters. These peers are remote slave clusters that data is replicated to. A peer cluster can be in three different states: 1. Not-Registered - There is no notion of the peer cluster. 2. Registered - The peer has an id and is being tracked but there is no connection. 3. Connected - There is an active connection to the remote peer. In the registered or connected state, a peer cluster can either be enabled or disabled.
Method Summary | |
---|---|
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. |
Method Detail |
---|
void init() throws IOException, org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
IOException
void addPeer(String peerId, String clusterKey) throws IOException
peerId
- a short that identifies the clusterclusterKey
- the concatenation of the slave cluster's:
hbase.zookeeper.quorum:hbase.zookeeper.property.clientPort:zookeeper.znode.parent
IOException
void removePeer(String peerId) throws IOException
peerId
- a short that identifies the cluster
IOException
void enablePeer(String peerId) throws IOException
peerId
- a short that identifies the cluster
IOException
void disablePeer(String peerId) throws IOException
peerId
- a short that identifies the cluster
IOException
boolean getStatusOfConnectedPeer(String peerId)
getStatusOfPeerFromBackingStore(String)
if reading the state after enabling or disabling it.
peerId
- a short that identifies the cluster
boolean getStatusOfPeerFromBackingStore(String peerId) throws IOException
peerId
- a short that identifies the cluster
IOException
- Throws if there's an error contacting the storeSet<String> getConnectedPeers()
Map<String,String> getAllPeerClusterKeys()
List<String> getAllPeerIds()
boolean connectToPeer(String peerId) throws IOException, org.apache.zookeeper.KeeperException
peerId
- a short that identifies the cluster
IOException
org.apache.zookeeper.KeeperException
void disconnectFromPeer(String peerId)
peerId
- a short that identifies the clusterList<ServerName> getRegionServersOfConnectedPeer(String peerId)
peerId
- a short that identifies the cluster
long getTimestampOfLastChangeToPeer(String peerId)
peerId
- identifier of the peer cluster for which the timestamp is requested
UUID getPeerUUID(String peerId)
peerId
- the peer's ID that will be converted into a UUID
org.apache.hadoop.conf.Configuration getPeerConf(String peerId) throws org.apache.zookeeper.KeeperException
peerId
- a short that identifies the cluster
org.apache.zookeeper.KeeperException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |