org.apache.hadoop.hbase.replication
Interface ReplicationQueuesClient

All Known Implementing Classes:
ReplicationQueuesClientZKImpl

@InterfaceAudience.Private
public interface ReplicationQueuesClient

This provides an interface for clients of replication to view replication queues. These queues keep track of the HLogs that still need to be replicated to remote clusters.


Method Summary
 List<String> getAllQueues(String serverName)
          Get a list of all queues for the specified region server.
 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 HLogs 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.
 

Method Detail

init

void init()
          throws ReplicationException
Initialize the replication queue client interface.

Throws:
ReplicationException

getListOfReplicators

List<String> getListOfReplicators()
                                  throws org.apache.zookeeper.KeeperException
Get a list of all region servers that have outstanding replication queues. These servers could be alive, dead or from a previous run of the cluster.

Returns:
a list of server names
Throws:
org.apache.zookeeper.KeeperException - zookeeper exception

getLogsInQueue

List<String> getLogsInQueue(String serverName,
                            String queueId)
                            throws org.apache.zookeeper.KeeperException
Get a list of all HLogs in the given queue on the given region server.

Parameters:
serverName - the server name of the region server that owns the queue
queueId - a String that identifies the queue
Returns:
a list of WALs, null if this region server is dead and has no outstanding queues
Throws:
org.apache.zookeeper.KeeperException - zookeeper exception

getAllQueues

List<String> getAllQueues(String serverName)
                          throws org.apache.zookeeper.KeeperException
Get a list of all queues for the specified region server.

Parameters:
serverName - the server name of the region server that owns the set of queues
Returns:
a list of queueIds, null if this region server is not a replicator.
Throws:
org.apache.zookeeper.KeeperException

getQueuesZNodeCversion

int getQueuesZNodeCversion()
                           throws org.apache.zookeeper.KeeperException
Get the cversion of replication rs node. This can be used as optimistic locking to get a consistent snapshot of the replication queues.

Returns:
cversion of replication rs node
Throws:
org.apache.zookeeper.KeeperException


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.