@InterfaceAudience.Private public class RegionServerTracker extends ZooKeeperListener
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)
watcher| 构造器和说明 |
|---|
RegionServerTracker(ZooKeeperWatcher watcher,
MasterServices server,
ServerManager serverManager) |
| 限定符和类型 | 方法和说明 |
|---|---|
List<ServerName> |
getOnlineServers()
Gets the online servers.
|
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionServerInfo |
getRegionServerInfo(ServerName sn) |
void |
nodeChildrenChanged(String path) |
void |
nodeDeleted(String path) |
void |
start()
Starts the tracking of online RegionServers.
|
getWatcher, nodeCreated, nodeDataChangedpublic RegionServerTracker(ZooKeeperWatcher watcher, MasterServices server, ServerManager serverManager)
public void start()
throws org.apache.zookeeper.KeeperException,
IOException
All RSs will be tracked after this method is called.
org.apache.zookeeper.KeeperExceptionIOExceptionpublic void nodeDeleted(String path)
nodeDeleted 在类中 ZooKeeperListenerpublic void nodeChildrenChanged(String path)
nodeChildrenChanged 在类中 ZooKeeperListenerpublic org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionServerInfo getRegionServerInfo(ServerName sn)
public List<ServerName> getOnlineServers()
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.