public class ZooKeeperLeaderRetrievalDriverFactory extends Object implements LeaderRetrievalDriverFactory
LeaderRetrievalDriverFactory implementation for Zookeeper.| 构造器和说明 |
|---|
ZooKeeperLeaderRetrievalDriverFactory(org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework client,
String retrievalPath,
ZooKeeperLeaderRetrievalDriver.LeaderInformationClearancePolicy leaderInformationClearancePolicy) |
| 限定符和类型 | 方法和说明 |
|---|---|
ZooKeeperLeaderRetrievalDriver |
createLeaderRetrievalDriver(LeaderRetrievalEventHandler leaderEventHandler,
org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler)
Create a specific
LeaderRetrievalDriver and start the necessary services. |
public ZooKeeperLeaderRetrievalDriverFactory(org.apache.flink.shaded.curator4.org.apache.curator.framework.CuratorFramework client,
String retrievalPath,
ZooKeeperLeaderRetrievalDriver.LeaderInformationClearancePolicy leaderInformationClearancePolicy)
public ZooKeeperLeaderRetrievalDriver createLeaderRetrievalDriver(LeaderRetrievalEventHandler leaderEventHandler, org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler) throws Exception
LeaderRetrievalDriverFactoryLeaderRetrievalDriver and start the necessary services. For
example, NodeCache in Zookeeper, ConfigMap watcher in Kubernetes. They could get the leader
information change events and need to notify the leader listener by LeaderRetrievalEventHandler.createLeaderRetrievalDriver 在接口中 LeaderRetrievalDriverFactoryleaderEventHandler - handler for the leader retrieval driver to notify leader change
events.fatalErrorHandler - fatal error handlerException - when create a specific LeaderRetrievalDriver implementation and
start the necessary services.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.