public class ZooKeeperLeaderElectionDriverFactory extends Object implements LeaderElectionDriverFactory
LeaderElectionDriverFactory
implementation for Zookeeper.Constructor and Description |
---|
ZooKeeperLeaderElectionDriverFactory(org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework client,
String latchPath,
String leaderPath) |
Modifier and Type | Method and Description |
---|---|
ZooKeeperLeaderElectionDriver |
createLeaderElectionDriver(LeaderElectionEventHandler leaderEventHandler,
FatalErrorHandler fatalErrorHandler,
String leaderContenderDescription)
Create a specific
LeaderElectionDriver and start the necessary services. |
public ZooKeeperLeaderElectionDriver createLeaderElectionDriver(LeaderElectionEventHandler leaderEventHandler, FatalErrorHandler fatalErrorHandler, String leaderContenderDescription) throws Exception
LeaderElectionDriverFactory
LeaderElectionDriver
and start the necessary services. For example,
LeaderLatch and NodeCache in Zookeeper, KubernetesLeaderElector and ConfigMap watcher in
Kubernetes.createLeaderElectionDriver
in interface LeaderElectionDriverFactory
leaderEventHandler
- handler for the leader election driver to process leader events.fatalErrorHandler
- fatal error handlerleaderContenderDescription
- leader contender description.Exception
- when create a specific LeaderElectionDriver
implementation and
start the necessary services.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.