@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.
|
void |
addPeer(String peerId,
String clusterKey,
String tableCFs)
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.
|
String |
getPeerTableCFsConfig(String peerId)
Get the table and column-family list string of the peer from ZK.
|
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.
|
Map<String,List<String>> |
getTableCFs(String peerId)
Get the table and column-family-list map of the peer.
|
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 |
setPeerTableCFsConfig(String peerId,
String tableCFs)
Set the table and column-family list string of the peer to ZK.
|
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 addPeer(String peerId, String clusterKey, String tableCFs) 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.parenttableCFs
- the table and column-family list which will be replicated for this peerReplicationException
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
String getPeerTableCFsConfig(String peerId) throws ReplicationException
peerId
- a short that identifies the clusterReplicationException
void setPeerTableCFsConfig(String peerId, String tableCFs) throws ReplicationException
peerId
- a short that identifies the clustertableCFs
- the table and column-family list which will be replicated for this peerReplicationException
Map<String,List<String>> getTableCFs(String peerId)
peerId
- a short that identifies the clusterboolean 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 © 2014 The Apache Software Foundation. All Rights Reserved.