org.apache.hadoop.hbase.zookeeper
Class RegionServerTracker
java.lang.Object
org.apache.hadoop.hbase.zookeeper.ZooKeeperListener
org.apache.hadoop.hbase.zookeeper.RegionServerTracker
@InterfaceAudience.Private
public class RegionServerTracker
- extends ZooKeeperListener
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(ServerName)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegionServerTracker
public RegionServerTracker(ZooKeeperWatcher watcher,
Abortable abortable,
ServerManager serverManager)
start
public void start()
throws org.apache.zookeeper.KeeperException,
IOException
- Starts the tracking of online RegionServers.
All 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
getRegionServerInfo
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionServerInfo getRegionServerInfo(ServerName sn)
getOnlineServers
public List<ServerName> getOnlineServers()
- Gets the online servers.
- Returns:
- list of online servers
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.