public class ZooKeeperLeaderRetrievalDriverFactory extends Object implements LeaderRetrievalDriverFactory
LeaderRetrievalDriverFactory
implementation for Zookeeper.Constructor and Description |
---|
ZooKeeperLeaderRetrievalDriverFactory(org.apache.flink.shaded.curator5.org.apache.curator.framework.CuratorFramework client,
String retrievalPath,
ZooKeeperLeaderRetrievalDriver.LeaderInformationClearancePolicy leaderInformationClearancePolicy) |
Modifier and Type | Method and Description |
---|---|
ZooKeeperLeaderRetrievalDriver |
createLeaderRetrievalDriver(LeaderRetrievalEventHandler leaderEventHandler,
FatalErrorHandler fatalErrorHandler)
Create a specific
LeaderRetrievalDriver and start the necessary services. |
public ZooKeeperLeaderRetrievalDriverFactory(org.apache.flink.shaded.curator5.org.apache.curator.framework.CuratorFramework client, String retrievalPath, ZooKeeperLeaderRetrievalDriver.LeaderInformationClearancePolicy leaderInformationClearancePolicy)
public ZooKeeperLeaderRetrievalDriver createLeaderRetrievalDriver(LeaderRetrievalEventHandler leaderEventHandler, FatalErrorHandler fatalErrorHandler) throws Exception
LeaderRetrievalDriverFactory
LeaderRetrievalDriver
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
in interface LeaderRetrievalDriverFactory
leaderEventHandler
- 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–2024 The Apache Software Foundation. All rights reserved.