@InterfaceAudience.Private @InterfaceStability.Unstable public class ActiveStandbyElectorBasedElectorService extends org.apache.hadoop.service.AbstractService implements EmbeddedElector, org.apache.hadoop.ha.ActiveStandbyElector.ActiveStandbyElectorCallback
ActiveStandbyElector.| Modifier and Type | Method and Description |
|---|---|
void |
becomeActive() |
void |
becomeStandby() |
void |
enterNeutralMode()
When the ZK client loses contact with ZK, this method will be called to
allow the RM to react.
|
void |
fenceOldActive(byte[] oldActiveData) |
String |
getZookeeperConnectionState()
Get information about the elector's connection to Zookeeper.
|
void |
notifyFatalError(String errorMessage) |
void |
rejoinElection()
Leave and rejoin leader election.
|
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
protected void |
serviceStart() |
protected void |
serviceStop() |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStopprotected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStop()
throws Exception
serviceStop in class org.apache.hadoop.service.AbstractServiceExceptionpublic void becomeActive()
throws org.apache.hadoop.ha.ServiceFailedException
becomeActive in interface org.apache.hadoop.ha.ActiveStandbyElector.ActiveStandbyElectorCallbackorg.apache.hadoop.ha.ServiceFailedExceptionpublic void becomeStandby()
becomeStandby in interface org.apache.hadoop.ha.ActiveStandbyElector.ActiveStandbyElectorCallbackpublic void enterNeutralMode()
YarnConfiguration.RM_ZK_TIMEOUT_MS milliseconds before
initiating the transition into standby state.enterNeutralMode in interface org.apache.hadoop.ha.ActiveStandbyElector.ActiveStandbyElectorCallbackpublic void notifyFatalError(String errorMessage)
notifyFatalError in interface org.apache.hadoop.ha.ActiveStandbyElector.ActiveStandbyElectorCallbackpublic void fenceOldActive(byte[] oldActiveData)
fenceOldActive in interface org.apache.hadoop.ha.ActiveStandbyElector.ActiveStandbyElectorCallbackpublic void rejoinElection()
EmbeddedElectorrejoinElection in interface EmbeddedElectorpublic String getZookeeperConnectionState()
EmbeddedElectorgetZookeeperConnectionState in interface EmbeddedElectorCopyright © 2022 Apache Software Foundation. All rights reserved.