org.apache.hadoop.hbase.replication
Class ReplicationQueuesClientZKImpl

java.lang.Object
  extended by org.apache.hadoop.hbase.replication.ReplicationStateZKBase
      extended by org.apache.hadoop.hbase.replication.ReplicationQueuesClientZKImpl
All Implemented Interfaces:
ReplicationQueuesClient

public class ReplicationQueuesClientZKImpl
extends ReplicationStateZKBase
implements ReplicationQueuesClient


Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.replication.ReplicationStateZKBase
abortable, conf, DISABLED_ZNODE_BYTES, ENABLED_ZNODE_BYTES, ourClusterKey, peerStateNodeName, peersZNode, queuesZNode, replicationZNode, zookeeper
 
Constructor Summary
ReplicationQueuesClientZKImpl(ZooKeeperWatcher zk, org.apache.hadoop.conf.Configuration conf, Abortable abortable)
           
 
Method Summary
 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 HLogs in the given queue on the given region server.
 void init()
          Initialize the replication queue client interface.
 
Methods inherited from class org.apache.hadoop.hbase.replication.ReplicationStateZKBase
getListOfReplicators, isPeerPath, peerExists, toByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.hbase.replication.ReplicationQueuesClient
getListOfReplicators
 

Constructor Detail

ReplicationQueuesClientZKImpl

public ReplicationQueuesClientZKImpl(ZooKeeperWatcher zk,
                                     org.apache.hadoop.conf.Configuration conf,
                                     Abortable abortable)
Method Detail

init

public void init()
          throws ReplicationException
Description copied from interface: ReplicationQueuesClient
Initialize the replication queue client interface.

Specified by:
init in interface ReplicationQueuesClient
Throws:
ReplicationException

getLogsInQueue

public List<String> getLogsInQueue(String serverName,
                                   String queueId)
Description copied from interface: ReplicationQueuesClient
Get a list of all HLogs in the given queue on the given region server.

Specified by:
getLogsInQueue in interface ReplicationQueuesClient
Parameters:
serverName - the server name of the region server that owns the queue
queueId - a String that identifies the queue
Returns:
a list of HLogs, null if this region server is dead and has no outstanding queues

getAllQueues

public List<String> getAllQueues(String serverName)
Description copied from interface: ReplicationQueuesClient
Get a list of all queues for the specified region server.

Specified by:
getAllQueues in interface ReplicationQueuesClient
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.


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.