@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
Modifier and Type | Method and Description |
---|---|
boolean |
isActiveMaster() |
void |
nodeCreated(String path) |
void |
nodeDeleted(String path) |
void |
stop() |
getWatcher, nodeChildrenChanged, nodeDataChanged
public void nodeCreated(String path)
nodeCreated
in class ZooKeeperListener
public void nodeDeleted(String path)
nodeDeleted
in class ZooKeeperListener
public boolean isActiveMaster()
public void stop()
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.