@InterfaceAudience.Private public class ActiveMasterManager extends ZooKeeperListener
Listens and responds to ZooKeeper notifications on the master znode,
both nodeCreated and nodeDeleted.
Contains blocking methods which will hold up backup masters, waiting for the active master to fail.
This class is instantiated in the HMaster constructor and the method #blockUntilBecomingActiveMaster() is called to wait until becoming the active master of the cluster.
watcher| 限定符和类型 | 方法和说明 |
|---|---|
void |
nodeCreated(String path) |
void |
nodeDeleted(String path) |
void |
setInfoPort(int infoPort) |
void |
stop() |
getWatcher, nodeChildrenChanged, nodeDataChangedpublic void setInfoPort(int infoPort)
public void nodeCreated(String path)
nodeCreated 在类中 ZooKeeperListenerpublic void nodeDeleted(String path)
nodeDeleted 在类中 ZooKeeperListenerpublic void stop()
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.