Class ZooKeeperLeaderRetrievalDriverFactory
- java.lang.Object
-
- org.apache.flink.runtime.leaderretrieval.ZooKeeperLeaderRetrievalDriverFactory
-
- All Implemented Interfaces:
LeaderRetrievalDriverFactory
public class ZooKeeperLeaderRetrievalDriverFactory extends Object implements LeaderRetrievalDriverFactory
LeaderRetrievalDriverFactory
implementation 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 ZooKeeperLeaderRetrievalDriver
createLeaderRetrievalDriver(LeaderRetrievalEventHandler leaderEventHandler, org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler)
Create a specificLeaderRetrievalDriver
and 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:LeaderRetrievalDriverFactory
Create a specificLeaderRetrievalDriver
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 byLeaderRetrievalEventHandler
.- Specified by:
createLeaderRetrievalDriver
in interfaceLeaderRetrievalDriverFactory
- Parameters:
leaderEventHandler
- handler for the leader retrieval driver to notify leader change events.fatalErrorHandler
- fatal error handler- Throws:
Exception
- when create a specificLeaderRetrievalDriver
implementation and start the necessary services.
-
-