|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.zookeeper.ZooKeeperListener
org.apache.hadoop.hbase.zookeeper.RegionServerTracker
public class RegionServerTracker
Tracks the online region servers via ZK.
Handling of new RSs checking in is done via RPC. This class is only responsible for watching for expired nodes. It handles listening for changes in the RS node list and watching each node.
If an RS node gets deleted, this automatically handles calling of
ServerManager.expireServer(org.apache.hadoop.hbase.HServerInfo)
.
Field Summary |
---|
Fields inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperListener |
---|
watcher |
Constructor Summary | |
---|---|
RegionServerTracker(ZooKeeperWatcher watcher,
Abortable abortable,
ServerManager serverManager)
|
Method Summary | |
---|---|
List<HServerAddress> |
getOnlineServers()
Gets the online servers. |
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 deleted |
void |
start()
Starts the tracking of online RegionServers. |
Methods inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperListener |
---|
nodeCreated, nodeDataChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegionServerTracker(ZooKeeperWatcher watcher, Abortable abortable, ServerManager serverManager)
Method Detail |
---|
public void start() throws org.apache.zookeeper.KeeperException
All RSs will be tracked after this method is called.
org.apache.zookeeper.KeeperException
public void nodeDeleted(String path)
ZooKeeperListener
nodeDeleted
in class ZooKeeperListener
path
- full path of the deleted nodepublic void nodeChildrenChanged(String path)
ZooKeeperListener
nodeChildrenChanged
in class ZooKeeperListener
path
- full path of the node whose children have changedpublic List<HServerAddress> getOnlineServers() throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |