Interface ReplicationPeer
- All Known Implementing Classes:
ReplicationPeerImpl
ReplicationPeer manages enabled / disabled state for the peer.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
State of the peer, whether it is enabled or not -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.conf.Configuration
Get the configuration object required to communicate with this peergetId()
Get the identifier of this peerGet replicable namespace set of this peerlong
Get the per node bandwidth upper limit for this peerGet the peer config objectReturns the state of the peer by reading local cache.Returns the sync replication state of the peer by reading local cache.Get replicable (table, cf-list) map of this peerdefault boolean
Test whether the peer is enabled.void
Register a peer config listener to catch the peer config change event.default void
Deprecated.since 2.1.0 and will be removed in 4.0.0.
-
Method Details
-
getId
Get the identifier of this peer- Returns:
- string representation of the id
-
getPeerState
Returns the state of the peer by reading local cache.- Returns:
- the enabled state
-
getSyncReplicationState
Returns the sync replication state of the peer by reading local cache.If the peer is not a synchronous replication peer, a
SyncReplicationState.NONE
will be returned.- Returns:
- the sync replication state
-
isPeerEnabled
Test whether the peer is enabled.- Returns:
true
if enabled, otherwisefalse
.
-
getPeerConfig
Get the peer config object- Returns:
- the ReplicationPeerConfig for this peer
-
getConfiguration
org.apache.hadoop.conf.Configuration getConfiguration()Get the configuration object required to communicate with this peer- Returns:
- configuration object
-
getTableCFs
Get replicable (table, cf-list) map of this peer- Returns:
- the replicable (table, cf-list) map
-
getNamespaces
Get replicable namespace set of this peer- Returns:
- the replicable namespaces set
-
getPeerBandwidth
long getPeerBandwidth()Get the per node bandwidth upper limit for this peer- Returns:
- the bandwidth upper limit
-
registerPeerConfigListener
Register a peer config listener to catch the peer config change event.- Parameters:
listener
- listener to catch the peer config change event.
-
trackPeerConfigChanges
Deprecated.since 2.1.0 and will be removed in 4.0.0. UseregisterPeerConfigListener(ReplicationPeerConfigListener)
instead.
-