@InterfaceAudience.Private public class ReplicationQueuesClientZKImpl extends ReplicationStateZKBase implements ReplicationQueuesClient
abortable, conf, DISABLED_ZNODE_BYTES, ENABLED_ZNODE_BYTES, ourClusterKey, peerStateNodeName, peersZNode, queuesZNode, replicationZNode, zookeeper
Constructor and Description |
---|
ReplicationQueuesClientZKImpl(ZooKeeperWatcher zk,
Configuration conf,
Abortable abortable) |
Modifier and Type | Method and Description |
---|---|
List<String> |
getAllQueues(String serverName)
Get a list of all queues for the specified region server.
|
List<String> |
getLogsInQueue(String serverName,
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.
|
void |
init()
Initialize the replication queue client interface.
|
getListOfReplicators, isPeerPath, peerExists, toByteArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getListOfReplicators
public ReplicationQueuesClientZKImpl(ZooKeeperWatcher zk, Configuration conf, Abortable abortable)
public void init() throws ReplicationException
ReplicationQueuesClient
init
in interface ReplicationQueuesClient
ReplicationException
public List<String> getLogsInQueue(String serverName, String queueId) throws KeeperException
ReplicationQueuesClient
getLogsInQueue
in interface ReplicationQueuesClient
serverName
- the server name of the region server that owns the queuequeueId
- a String that identifies the queueKeeperException
- zookeeper exceptionpublic List<String> getAllQueues(String serverName) throws KeeperException
ReplicationQueuesClient
getAllQueues
in interface ReplicationQueuesClient
serverName
- the server name of the region server that owns the set of queuesKeeperException
public int getQueuesZNodeCversion() throws KeeperException
ReplicationQueuesClient
getQueuesZNodeCversion
in interface ReplicationQueuesClient
KeeperException