org.apache.hadoop.hbase.master
Class ActiveMasterManager
java.lang.Object
org.apache.hadoop.hbase.zookeeper.ZooKeeperListener
org.apache.hadoop.hbase.master.ActiveMasterManager
@InterfaceAudience.Private
public class ActiveMasterManager
- extends ZooKeeperListener
Handles everything on master-side related to master election.
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nodeCreated
public void nodeCreated(String path)
- Overrides:
nodeCreated
in class ZooKeeperListener
nodeDeleted
public void nodeDeleted(String path)
- Overrides:
nodeDeleted
in class ZooKeeperListener
isActiveMaster
public boolean isActiveMaster()
- Returns:
- True if cluster has an active master.
stop
public void stop()
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.