org.apache.hadoop.hbase.zookeeper
Class DrainingServerTracker

java.lang.Object
  extended by org.apache.hadoop.hbase.zookeeper.ZooKeeperListener
      extended by org.apache.hadoop.hbase.zookeeper.DrainingServerTracker

@InterfaceAudience.Private
public class DrainingServerTracker
extends ZooKeeperListener

Tracks the list of draining region servers via ZK.

This class is responsible for watching for changes to the draining servers list. It handles adds/deletes in the draining RS list and watches each node.

If an RS gets deleted from draining list, we call ServerManager.removeServerFromDrainList(ServerName)

If an RS gets added to the draining list, we add a watcher to it and call ServerManager.addServerToDrainList(ServerName)


Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperListener
watcher
 
Constructor Summary
DrainingServerTracker(ZooKeeperWatcher watcher, Abortable abortable, ServerManager serverManager)
           
 
Method Summary
 void nodeChildrenChanged(String path)
           
 void nodeDeleted(String path)
           
 void start()
          Starts the tracking of draining RegionServers.
 
Methods inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperListener
getWatcher, nodeCreated, nodeDataChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrainingServerTracker

public DrainingServerTracker(ZooKeeperWatcher watcher,
                             Abortable abortable,
                             ServerManager serverManager)
Method Detail

start

public void start()
           throws org.apache.zookeeper.KeeperException,
                  IOException
Starts the tracking of draining RegionServers.

All Draining RSs will be tracked after this method is called.

Throws:
org.apache.zookeeper.KeeperException
IOException

nodeDeleted

public void nodeDeleted(String path)
Overrides:
nodeDeleted in class ZooKeeperListener

nodeChildrenChanged

public void nodeChildrenChanged(String path)
Overrides:
nodeChildrenChanged in class ZooKeeperListener


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