@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, waitForServiceToStop
protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
serviceInit
in class org.apache.hadoop.service.AbstractService
Exception
protected void serviceStart() throws Exception
serviceStart
in class org.apache.hadoop.service.AbstractService
Exception
protected void serviceStop() throws Exception
serviceStop
in class org.apache.hadoop.service.AbstractService
Exception
public void becomeActive() throws org.apache.hadoop.ha.ServiceFailedException
becomeActive
in interface org.apache.hadoop.ha.ActiveStandbyElector.ActiveStandbyElectorCallback
org.apache.hadoop.ha.ServiceFailedException
public void becomeStandby()
becomeStandby
in interface org.apache.hadoop.ha.ActiveStandbyElector.ActiveStandbyElectorCallback
public void enterNeutralMode()
YarnConfiguration.RM_ZK_TIMEOUT_MS
milliseconds before
initiating the transition into standby state.enterNeutralMode
in interface org.apache.hadoop.ha.ActiveStandbyElector.ActiveStandbyElectorCallback
public void notifyFatalError(String errorMessage)
notifyFatalError
in interface org.apache.hadoop.ha.ActiveStandbyElector.ActiveStandbyElectorCallback
public void fenceOldActive(byte[] oldActiveData)
fenceOldActive
in interface org.apache.hadoop.ha.ActiveStandbyElector.ActiveStandbyElectorCallback
public void rejoinElection()
EmbeddedElector
rejoinElection
in interface EmbeddedElector
public String getZookeeperConnectionState()
EmbeddedElector
getZookeeperConnectionState
in interface EmbeddedElector
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.