public class ZooKeeperLeaderElectionDriverFactory extends Object implements LeaderElectionDriverFactory
LeaderElectionDriverFactory implementation for Zookeeper.| 构造器和说明 |
|---|
ZooKeeperLeaderElectionDriverFactory(org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework client,
String path) |
| 限定符和类型 | 方法和说明 |
|---|---|
ZooKeeperLeaderElectionDriver |
createLeaderElectionDriver(LeaderElectionEventHandler leaderEventHandler,
org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler,
String leaderContenderDescription)
Create a specific
LeaderElectionDriver and start the necessary services. |
public ZooKeeperLeaderElectionDriverFactory(org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework client,
String path)
public ZooKeeperLeaderElectionDriver createLeaderElectionDriver(LeaderElectionEventHandler leaderEventHandler, org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler, String leaderContenderDescription) throws Exception
LeaderElectionDriverFactoryLeaderElectionDriver and start the necessary services. For example,
LeaderLatch and NodeCache in Zookeeper, KubernetesLeaderElector and ConfigMap watcher in
Kubernetes.createLeaderElectionDriver 在接口中 LeaderElectionDriverFactoryleaderEventHandler - 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.