org.apache.hadoop.hbase.replication
Class ReplicationTrackerZKImpl

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

public class ReplicationTrackerZKImpl
extends ReplicationStateZKBase
implements ReplicationTracker

This class is a Zookeeper implementation of the ReplicationTracker interface. This class is responsible for handling replication events that are defined in the ReplicationListener interface.


Nested Class Summary
 class ReplicationTrackerZKImpl.OtherRegionServerWatcher
          Watcher used to be notified of the other region server's death in the local cluster.
 class ReplicationTrackerZKImpl.PeersWatcher
          Watcher used to follow the creation and deletion of peer clusters.
 
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
ReplicationTrackerZKImpl(ZooKeeperWatcher zookeeper, ReplicationPeers replicationPeers, org.apache.hadoop.conf.Configuration conf, Abortable abortable, Stoppable stopper)
           
 
Method Summary
 List<String> getListOfRegionServers()
          Return a snapshot of the current region servers.
 void registerListener(ReplicationListener listener)
          Register a replication listener to receive replication events.
 void removeListener(ReplicationListener listener)
           
 
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
 

Constructor Detail

ReplicationTrackerZKImpl

public ReplicationTrackerZKImpl(ZooKeeperWatcher zookeeper,
                                ReplicationPeers replicationPeers,
                                org.apache.hadoop.conf.Configuration conf,
                                Abortable abortable,
                                Stoppable stopper)
Method Detail

registerListener

public void registerListener(ReplicationListener listener)
Description copied from interface: ReplicationTracker
Register a replication listener to receive replication events.

Specified by:
registerListener in interface ReplicationTracker

removeListener

public void removeListener(ReplicationListener listener)
Specified by:
removeListener in interface ReplicationTracker

getListOfRegionServers

public List<String> getListOfRegionServers()
Return a snapshot of the current region servers.

Specified by:
getListOfRegionServers in interface ReplicationTracker
Returns:
List of region servers.


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