Class ZooKeeperLeaderRetrievalDriverFactory
- java.lang.Object
-
- org.apache.flink.runtime.leaderretrieval.ZooKeeperLeaderRetrievalDriverFactory
-
- All Implemented Interfaces:
LeaderRetrievalDriverFactory
public class ZooKeeperLeaderRetrievalDriverFactory extends Object implements LeaderRetrievalDriverFactory
LeaderRetrievalDriverFactoryimplementation for Zookeeper.
-
-
Constructor Summary
Constructors Constructor Description ZooKeeperLeaderRetrievalDriverFactory(org.apache.flink.shaded.curator5.org.apache.curator.framework.CuratorFramework client, String retrievalPath, ZooKeeperLeaderRetrievalDriver.LeaderInformationClearancePolicy leaderInformationClearancePolicy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZooKeeperLeaderRetrievalDrivercreateLeaderRetrievalDriver(LeaderRetrievalEventHandler leaderEventHandler, org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler)Create a specificLeaderRetrievalDriverand start the necessary services.
-
-
-
Constructor Detail
-
ZooKeeperLeaderRetrievalDriverFactory
public ZooKeeperLeaderRetrievalDriverFactory(org.apache.flink.shaded.curator5.org.apache.curator.framework.CuratorFramework client, String retrievalPath, ZooKeeperLeaderRetrievalDriver.LeaderInformationClearancePolicy leaderInformationClearancePolicy)
-
-
Method Detail
-
createLeaderRetrievalDriver
public ZooKeeperLeaderRetrievalDriver createLeaderRetrievalDriver(LeaderRetrievalEventHandler leaderEventHandler, org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler) throws Exception
Description copied from interface:LeaderRetrievalDriverFactoryCreate a specificLeaderRetrievalDriverand 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 byLeaderRetrievalEventHandler.- Specified by:
createLeaderRetrievalDriverin interfaceLeaderRetrievalDriverFactory- Parameters:
leaderEventHandler- handler for the leader retrieval driver to notify leader change events.fatalErrorHandler- fatal error handler- Throws:
Exception- when create a specificLeaderRetrievalDriverimplementation and start the necessary services.
-
-