Package org.apache.hadoop.hbase.master
Class DrainingServerTracker
java.lang.Object
org.apache.hadoop.hbase.zookeeper.ZKListener
org.apache.hadoop.hbase.master.DrainingServerTracker
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)
This class is deprecated in 2.0 because decommission/draining API goes through master in 2.0. Can remove this class in 3.0.
-
Field Summary
Modifier and TypeFieldDescriptionprivate Abortable
private final NavigableSet<ServerName>
private static final org.slf4j.Logger
private ServerManager
Fields inherited from class org.apache.hadoop.hbase.zookeeper.ZKListener
watcher
-
Constructor Summary
ConstructorDescriptionDrainingServerTracker
(ZKWatcher watcher, Abortable abortable, ServerManager serverManager) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
nodeChildrenChanged
(String path) Called when an existing node has a child node added or removed.void
nodeDeleted
(String path) Called when a node has been deletedprivate void
remove
(ServerName sn) void
start()
Starts the tracking of draining RegionServers.Methods inherited from class org.apache.hadoop.hbase.zookeeper.ZKListener
getWatcher, nodeCreated, nodeDataChanged
-
Field Details
-
LOG
-
serverManager
-
drainingServers
-
abortable
-
-
Constructor Details
-
DrainingServerTracker
-
-
Method Details
-
start
Starts the tracking of draining RegionServers.All Draining RSs will be tracked after this method is called.
- Throws:
org.apache.zookeeper.KeeperException
IOException
-
add
- Throws:
IOException
-
remove
-
nodeDeleted
Description copied from class:ZKListener
Called when a node has been deleted- Overrides:
nodeDeleted
in classZKListener
- Parameters:
path
- full path of the deleted node
-
nodeChildrenChanged
Description copied from class:ZKListener
Called when an existing node has a child node added or removed.- Overrides:
nodeChildrenChanged
in classZKListener
- Parameters:
path
- full path of the node whose children have changed
-