@InterfaceAudience.Private public class ZKReplicationPeerStorage extends ZKReplicationStorageBase implements ReplicationPeerStorage
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
DISABLED_ZNODE_BYTES |
static byte[] |
ENABLED_ZNODE_BYTES |
static String |
PEERS_STATE_ZNODE |
static String |
PEERS_STATE_ZNODE_DEFAULT |
static String |
PEERS_ZNODE |
static String |
PEERS_ZNODE_DEFAULT |
conf, REPLICATION_ZNODE, REPLICATION_ZNODE_DEFAULT, replicationZNode, zookeeper| Constructor and Description |
|---|
ZKReplicationPeerStorage(org.apache.hadoop.hbase.zookeeper.ZKWatcher zookeeper,
org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPeer(String peerId,
org.apache.hadoop.hbase.replication.ReplicationPeerConfig peerConfig,
boolean enabled)
Add a replication peer.
|
org.apache.hadoop.hbase.replication.ReplicationPeerConfig |
getPeerConfig(String peerId)
Get the peer config of a replication peer.
|
String |
getPeerNode(String peerId) |
String |
getPeerStateNode(String peerId) |
boolean |
isPeerEnabled(String peerId)
Test whether a replication peer is enabled.
|
List<String> |
listPeerIds()
Return the peer ids of all replication peers.
|
void |
removePeer(String peerId)
Remove a replication peer.
|
void |
setPeerState(String peerId,
boolean enabled)
Set the state of peer,
true to ENABLED, otherwise to DISABLED. |
void |
updatePeerConfig(String peerId,
org.apache.hadoop.hbase.replication.ReplicationPeerConfig peerConfig)
Update the config a replication peer.
|
toByteArraypublic static final String PEERS_ZNODE
public static final String PEERS_ZNODE_DEFAULT
public static final String PEERS_STATE_ZNODE
public static final String PEERS_STATE_ZNODE_DEFAULT
public static final byte[] ENABLED_ZNODE_BYTES
public static final byte[] DISABLED_ZNODE_BYTES
public ZKReplicationPeerStorage(org.apache.hadoop.hbase.zookeeper.ZKWatcher zookeeper,
org.apache.hadoop.conf.Configuration conf)
public void addPeer(String peerId, org.apache.hadoop.hbase.replication.ReplicationPeerConfig peerConfig, boolean enabled) throws org.apache.hadoop.hbase.replication.ReplicationException
ReplicationPeerStorageaddPeer in interface ReplicationPeerStorageReplicationException - if there are errors accessing the storage service.public void removePeer(String peerId) throws org.apache.hadoop.hbase.replication.ReplicationException
ReplicationPeerStorageremovePeer in interface ReplicationPeerStorageReplicationException - if there are errors accessing the storage service.public void setPeerState(String peerId, boolean enabled) throws org.apache.hadoop.hbase.replication.ReplicationException
ReplicationPeerStoragetrue to ENABLED, otherwise to DISABLED.setPeerState in interface ReplicationPeerStorageReplicationException - if there are errors accessing the storage service.public void updatePeerConfig(String peerId, org.apache.hadoop.hbase.replication.ReplicationPeerConfig peerConfig) throws org.apache.hadoop.hbase.replication.ReplicationException
ReplicationPeerStorageupdatePeerConfig in interface ReplicationPeerStorageReplicationException - if there are errors accessing the storage service.public List<String> listPeerIds() throws org.apache.hadoop.hbase.replication.ReplicationException
ReplicationPeerStoragelistPeerIds in interface ReplicationPeerStorageReplicationException - if there are errors accessing the storage service.public boolean isPeerEnabled(String peerId) throws org.apache.hadoop.hbase.replication.ReplicationException
ReplicationPeerStorageisPeerEnabled in interface ReplicationPeerStorageReplicationException - if there are errors accessing the storage service.public org.apache.hadoop.hbase.replication.ReplicationPeerConfig getPeerConfig(String peerId) throws org.apache.hadoop.hbase.replication.ReplicationException
ReplicationPeerStoragegetPeerConfig in interface ReplicationPeerStorageReplicationException - if there are errors accessing the storage service.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.