@InterfaceAudience.Private public class ActiveMasterManager extends ZKListener
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
Modifier and Type | Method and Description |
---|---|
void |
nodeCreated(String path)
Called when a new node has been created.
|
void |
nodeDeleted(String path)
Called when a node has been deleted
|
void |
setInfoPort(int infoPort) |
void |
stop() |
getWatcher, nodeChildrenChanged, nodeDataChanged
public void setInfoPort(int infoPort)
public void nodeCreated(String path)
ZKListener
nodeCreated
in class ZKListener
path
- full path of the new nodepublic void nodeDeleted(String path)
ZKListener
nodeDeleted
in class ZKListener
path
- full path of the deleted nodepublic void stop()
Copyright © 2007–2019 Cloudera. All rights reserved.