@InterfaceAudience.Private public class ReplicationQueuesClientZKImpl extends ReplicationStateZKBase implements ReplicationQueuesClient
abortable, conf, DISABLED_ZNODE_BYTES, ENABLED_ZNODE_BYTES, hfileRefsZNode, ourClusterKey, peerStateNodeName, peersZNode, queuesZNode, replicationForBulkLoadEnabled, replicationZNode, zookeeper, ZOOKEEPER_ZNODE_REPLICATION_HFILE_REFS_DEFAULT, ZOOKEEPER_ZNODE_REPLICATION_HFILE_REFS_KEY| Constructor and Description |
|---|
ReplicationQueuesClientZKImpl(ZooKeeperWatcher zk,
Configuration conf,
Abortable abortable) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getAllPeersFromHFileRefsQueue()
Get list of all peers from hfile reference queue.
|
java.util.List<java.lang.String> |
getAllQueues(java.lang.String serverName)
Get a list of all queues for the specified region server.
|
int |
getHFileRefsNodeChangeVersion()
Get the change version number of replication hfile references node.
|
java.util.List<java.lang.String> |
getLogsInQueue(java.lang.String serverName,
java.lang.String queueId)
Get a list of all WALs in the given queue on the given region server.
|
int |
getQueuesZNodeCversion()
Get the cversion of replication rs node.
|
java.util.List<java.lang.String> |
getReplicableHFiles(java.lang.String peerId)
Get a list of all hfile references in the given peer.
|
void |
init()
Initialize the replication queue client interface.
|
getListOfReplicators, isPeerPath, peerExists, toByteArrayclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetListOfReplicatorspublic ReplicationQueuesClientZKImpl(ZooKeeperWatcher zk, Configuration conf, Abortable abortable)
public void init()
throws ReplicationException
ReplicationQueuesClientinit in interface ReplicationQueuesClientReplicationExceptionpublic java.util.List<java.lang.String> getLogsInQueue(java.lang.String serverName,
java.lang.String queueId)
throws KeeperException
ReplicationQueuesClientgetLogsInQueue in interface ReplicationQueuesClientserverName - the server name of the region server that owns the queuequeueId - a String that identifies the queueKeeperException - zookeeper exceptionpublic java.util.List<java.lang.String> getAllQueues(java.lang.String serverName)
throws KeeperException
ReplicationQueuesClientgetAllQueues in interface ReplicationQueuesClientserverName - the server name of the region server that owns the set of queuesKeeperExceptionpublic int getQueuesZNodeCversion()
throws KeeperException
ReplicationQueuesClientgetQueuesZNodeCversion in interface ReplicationQueuesClientKeeperExceptionpublic int getHFileRefsNodeChangeVersion()
throws KeeperException
ReplicationQueuesClientgetHFileRefsNodeChangeVersion in interface ReplicationQueuesClientKeeperExceptionpublic java.util.List<java.lang.String> getAllPeersFromHFileRefsQueue()
throws KeeperException
ReplicationQueuesClientgetAllPeersFromHFileRefsQueue in interface ReplicationQueuesClientKeeperException - zookeeper exceptionpublic java.util.List<java.lang.String> getReplicableHFiles(java.lang.String peerId)
throws KeeperException
ReplicationQueuesClientgetReplicableHFiles in interface ReplicationQueuesClientpeerId - a String that identifies the peerKeeperException - zookeeper exception