@InterfaceAudience.Private public class DrainingServerTracker extends ZooKeeperListener
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)
watcher| Constructor and Description |
|---|
DrainingServerTracker(ZooKeeperWatcher watcher,
Abortable abortable,
ServerManager serverManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
nodeChildrenChanged(String path) |
void |
nodeDeleted(String path) |
void |
start()
Starts the tracking of draining RegionServers.
|
nodeCreated, nodeDataChangedpublic DrainingServerTracker(ZooKeeperWatcher watcher, Abortable abortable, ServerManager serverManager)
public void start()
throws org.apache.zookeeper.KeeperException,
IOException
All Draining RSs will be tracked after this method is called.
org.apache.zookeeper.KeeperExceptionIOExceptionpublic void nodeDeleted(String path)
nodeDeleted in class ZooKeeperListenerpublic void nodeChildrenChanged(String path)
nodeChildrenChanged in class ZooKeeperListenerCopyright © 2014 The Apache Software Foundation. All Rights Reserved.