@InterfaceAudience.Private public interface ReplicationPeers
| Modifier and Type | Method and Description |
|---|---|
void |
disablePeer(String peerId)
Stop the replication to the specified remote slave cluster.
|
void |
enablePeer(String peerId)
Restart the replication to the specified remote slave cluster.
|
Map<String,ReplicationPeerConfig> |
getAllPeerConfigs()
List the cluster replication configs 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).
|
ReplicationPeer |
getConnectedPeer(String peerId)
Returns the ReplicationPeer for the specified connected peer.
|
Set<String> |
getConnectedPeerIds()
Returns the set of peerIds of the clusters that have been connected and have an underlying
ReplicationPeer.
|
Pair<ReplicationPeerConfig,org.apache.hadoop.conf.Configuration> |
getPeerConf(String peerId)
Returns the configuration needed to talk to the remote slave cluster.
|
Map<TableName,List<String>> |
getPeerTableCFsConfig(String peerId)
Get the table and column-family list string of the peer from the underlying storage.
|
ReplicationPeerConfig |
getReplicationPeerConfig(String peerId)
Returns the configured ReplicationPeerConfig for this peerId
|
boolean |
getStatusOfPeer(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.
|
void |
init()
Initialize the ReplicationPeers interface.
|
boolean |
peerConnected(String peerId)
Method called after a peer has been connected.
|
void |
peerDisconnected(String peerId)
Method called after a peer has been disconnected.
|
default void |
registerPeer(String peerId,
ReplicationPeerConfig peerConfig)
Add a new remote slave cluster for replication.
|
void |
registerPeer(String peerId,
ReplicationPeerConfig peerConfig,
boolean enabled)
Add a new remote slave cluster for replication.
|
void |
setPeerTableCFsConfig(String peerId,
Map<TableName,? extends Collection<String>> tableCFs)
Set the table and column-family list string of the peer to the underlying storage.
|
void |
unregisterPeer(String peerId)
Removes a remote slave cluster and stops the replication to it.
|
void |
updatePeerConfig(String id,
ReplicationPeerConfig peerConfig)
Update the peerConfig for the a given peer cluster
|
void init() throws ReplicationException
ReplicationExceptiondefault void registerPeer(String peerId, ReplicationPeerConfig peerConfig) throws ReplicationException
peerId - a short that identifies the clusterpeerConfig - configuration for the replication slave clusterReplicationExceptionvoid registerPeer(String peerId, ReplicationPeerConfig peerConfig, boolean enabled) throws ReplicationException
peerId - a short that identifies the clusterpeerConfig - configuration for the replication slave clusterenabled - peer state, true if ENABLED and false if DISABLEDReplicationExceptionvoid unregisterPeer(String peerId) throws ReplicationException
peerId - a short that identifies the clusterReplicationExceptionboolean peerConnected(String peerId) throws ReplicationException
peerId - a short that identifies the clusterReplicationExceptionvoid peerDisconnected(String peerId)
peerId - a short that identifies the clustervoid enablePeer(String peerId) throws ReplicationException
peerId - a short that identifies the clusterReplicationExceptionvoid disablePeer(String peerId) throws ReplicationException
peerId - a short that identifies the clusterReplicationExceptionMap<TableName,List<String>> getPeerTableCFsConfig(String peerId) throws ReplicationException
peerId - a short that identifies the clusterReplicationExceptionvoid setPeerTableCFsConfig(String peerId, Map<TableName,? extends Collection<String>> tableCFs) throws ReplicationException
peerId - a short that identifies the clustertableCFs - the table and column-family list which will be replicated for this peerReplicationExceptionReplicationPeer getConnectedPeer(String peerId)
peerId - id for the peerSet<String> getConnectedPeerIds()
boolean getStatusOfPeer(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 clusterReplicationException - thrown if there's an error contacting the storeMap<String,ReplicationPeerConfig> getAllPeerConfigs()
List<String> getAllPeerIds()
ReplicationPeerConfig getReplicationPeerConfig(String peerId) throws ReplicationException
peerId - a short name that identifies the clusterReplicationExceptionPair<ReplicationPeerConfig,org.apache.hadoop.conf.Configuration> getPeerConf(String peerId) throws ReplicationException
peerId - a short that identifies the clusterReplicationExceptionvoid updatePeerConfig(String id, ReplicationPeerConfig peerConfig) throws ReplicationException
id - a short that identifies the clusterpeerConfig - new config for the peer clusterReplicationExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.