@InterfaceAudience.Private public class ActiveMasterManager extends ZKListener
Listens and responds to ZooKeeper notifications on the master znodes, 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 |
|---|---|
int |
getActiveMasterInfoPort() |
Optional<ServerName> |
getActiveMasterServerName() |
int |
getBackupMasterInfoPort(ServerName sn) |
List<ServerName> |
getBackupMasters()
Returns list of registered backup masters.
|
void |
nodeChildrenChanged(String path) |
void |
nodeCreated(String path) |
void |
nodeDeleted(String path) |
void |
setInfoPort(int infoPort) |
void |
stop() |
getWatcher, nodeDataChangedpublic void setInfoPort(int infoPort)
public void nodeCreated(String path)
nodeCreated in class ZKListenerpublic void nodeChildrenChanged(String path)
nodeChildrenChanged in class ZKListenerpublic void nodeDeleted(String path)
nodeDeleted in class ZKListenerpublic Optional<ServerName> getActiveMasterServerName()
public int getActiveMasterInfoPort()
public int getBackupMasterInfoPort(ServerName sn)
public void stop()
public List<ServerName> getBackupMasters()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.