@InterfaceAudience.Private @InterfaceStability.Unstable public class CuratorBasedElectorService extends org.apache.hadoop.service.AbstractService implements EmbeddedElector, org.apache.curator.framework.recipes.leader.LeaderLatchListener
| Modifier and Type | Field and Description | 
|---|---|
| static org.slf4j.Logger | LOG | 
| Constructor and Description | 
|---|
| CuratorBasedElectorService(ResourceManager rm) | 
| Modifier and Type | Method and Description | 
|---|---|
| org.apache.curator.framework.CuratorFramework | getCuratorClient() | 
| String | getZookeeperConnectionState()Get information about the elector's connection to Zookeeper. | 
| void | isLeader() | 
| void | notLeader() | 
| void | rejoinElection()Leave and rejoin leader election. | 
| protected void | serviceInit(org.apache.hadoop.conf.Configuration conf) | 
| protected void | serviceStop() | 
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceStart, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic CuratorBasedElectorService(ResourceManager rm)
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
                    throws Exception
serviceInit in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStop()
                    throws Exception
serviceStop in class org.apache.hadoop.service.AbstractServiceExceptionpublic void rejoinElection()
EmbeddedElectorrejoinElection in interface EmbeddedElectorpublic String getZookeeperConnectionState()
EmbeddedElectorgetZookeeperConnectionState in interface EmbeddedElectorpublic void isLeader()
isLeader in interface org.apache.curator.framework.recipes.leader.LeaderLatchListenerpublic void notLeader()
notLeader in interface org.apache.curator.framework.recipes.leader.LeaderLatchListenerpublic org.apache.curator.framework.CuratorFramework getCuratorClient()
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.