java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.ha.ActiveStandbyElector.ActiveStandbyElectorCallback, org.apache.hadoop.service.Service, EmbeddedElector@Private @Unstable public class ActiveStandbyElectorBasedElectorService extends org.apache.hadoop.service.AbstractService implements EmbeddedElector, org.apache.hadoop.ha.ActiveStandbyElector.ActiveStandbyElectorCallback
ActiveStandbyElector.| Modifier and Type | Method | 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) |
|
java.lang.String |
getZookeeperConnectionState() |
Get information about the elector's connection to Zookeeper.
|
void |
notifyFatalError(java.lang.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 java.lang.Exception
serviceInit in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionprotected void serviceStart()
throws java.lang.Exception
serviceStart in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionprotected void serviceStop()
throws java.lang.Exception
serviceStop in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionpublic 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(java.lang.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 java.lang.String getZookeeperConnectionState()
EmbeddedElectorgetZookeeperConnectionState in interface EmbeddedElectorCopyright © 2008–2025 Apache Software Foundation. All rights reserved.