@InterfaceAudience.Private public class ReplicationQueuesClientZKImpl extends ReplicationStateZKBase implements ReplicationQueuesClient
| Modifier and Type | Field and Description |
|---|---|
(package private) org.slf4j.Logger |
LOG |
abortable, conf, DISABLED_ZNODE_BYTES, ENABLED_ZNODE_BYTES, hfileRefsZNode, ourClusterKey, peerStateNodeName, peersZNode, queuesZNode, replicationZNode, tableCFsNodeName, zookeeper, ZOOKEEPER_ZNODE_REPLICATION_HFILE_REFS_DEFAULT, ZOOKEEPER_ZNODE_REPLICATION_HFILE_REFS_KEY| Constructor and Description |
|---|
ReplicationQueuesClientZKImpl(ReplicationQueuesClientArguments args) |
ReplicationQueuesClientZKImpl(ZKWatcher zk,
org.apache.hadoop.conf.Configuration conf,
Abortable abortable) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAllPeersFromHFileRefsQueue()
Get list of all peers from hfile reference queue.
|
List<String> |
getAllQueues(String serverName)
Get a list of all queues for the specified region server.
|
Set<String> |
getAllWALs()
Load all wals in all replication queues from ZK.
|
int |
getHFileRefsNodeChangeVersion()
Get the change version number of replication hfile references node.
|
List<String> |
getListOfReplicators()
Get a list of all region servers that have outstanding replication queues.
|
List<String> |
getLogsInQueue(String serverName,
String queueId)
Get a list of all WALs in the given queue on the given region server.
|
int |
getQueuesZNodeCversion() |
List<String> |
getReplicableHFiles(String peerId)
Get a list of all hfile references in the given peer.
|
void |
init()
Initialize the replication queue client interface.
|
getListOfReplicatorsZK, getPeerNode, getPeerStateNode, getTableCFsNode, isPeerPath, peerExists, toByteArrayorg.slf4j.Logger LOG
public ReplicationQueuesClientZKImpl(ReplicationQueuesClientArguments args)
public ReplicationQueuesClientZKImpl(ZKWatcher zk, org.apache.hadoop.conf.Configuration conf, Abortable abortable)
public void init() throws ReplicationException
ReplicationQueuesClientinit in interface ReplicationQueuesClientReplicationExceptionpublic List<String> getListOfReplicators() throws org.apache.zookeeper.KeeperException
ReplicationQueuesClientgetListOfReplicators in interface ReplicationQueuesClientorg.apache.zookeeper.KeeperException - zookeeper exceptionpublic List<String> getLogsInQueue(String serverName, String queueId) throws org.apache.zookeeper.KeeperException
ReplicationQueuesClientgetLogsInQueue in interface ReplicationQueuesClientserverName - the server name of the region server that owns the queuequeueId - a String that identifies the queueorg.apache.zookeeper.KeeperException - zookeeper exceptionpublic List<String> getAllQueues(String serverName) throws org.apache.zookeeper.KeeperException
ReplicationQueuesClientgetAllQueues in interface ReplicationQueuesClientserverName - the server name of the region server that owns the set of queuesorg.apache.zookeeper.KeeperExceptionpublic Set<String> getAllWALs() throws org.apache.zookeeper.KeeperException
ReplicationQueuesClientgetAllWALs in interface ReplicationQueuesClientorg.apache.zookeeper.KeeperExceptionpublic int getQueuesZNodeCversion() throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperExceptionpublic int getHFileRefsNodeChangeVersion() throws org.apache.zookeeper.KeeperException
ReplicationQueuesClientgetHFileRefsNodeChangeVersion in interface ReplicationQueuesClientorg.apache.zookeeper.KeeperExceptionpublic List<String> getAllPeersFromHFileRefsQueue() throws org.apache.zookeeper.KeeperException
ReplicationQueuesClientgetAllPeersFromHFileRefsQueue in interface ReplicationQueuesClientorg.apache.zookeeper.KeeperException - zookeeper exceptionpublic List<String> getReplicableHFiles(String peerId) throws org.apache.zookeeper.KeeperException
ReplicationQueuesClientgetReplicableHFiles in interface ReplicationQueuesClientpeerId - a String that identifies the peerorg.apache.zookeeper.KeeperException - zookeeper exceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.