|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.zookeeper.ZooKeeperListener
org.apache.hadoop.hbase.master.ActiveMasterManager
public class ActiveMasterManager
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.
Field Summary |
---|
Fields inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperListener |
---|
watcher |
Method Summary | |
---|---|
ServerName |
getActiveMaster()
|
boolean |
isActiveMaster()
|
void |
nodeCreated(String path)
Called when a new node has been created. |
void |
nodeDeleted(String path)
Called when a node has been deleted |
void |
stop()
|
Methods inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperListener |
---|
nodeChildrenChanged, nodeDataChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void nodeCreated(String path)
ZooKeeperListener
nodeCreated
in class ZooKeeperListener
path
- full path of the new nodepublic void nodeDeleted(String path)
ZooKeeperListener
nodeDeleted
in class ZooKeeperListener
path
- full path of the deleted nodepublic boolean isActiveMaster()
public void stop()
public ServerName getActiveMaster()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |