KubernetesMultipleComponentLeaderElectionDriver
@Deprecated public class KubernetesLeaderElectionDriver extends Object implements LeaderElectionDriver
LeaderElectionDriver
implementation for Kubernetes. The active leader is elected using
Kubernetes. The current leader's address as well as its leader session ID is published via
Kubernetes ConfigMap. Note that the contending lock and leader storage are using the same
ConfigMap. And every component(e.g. ResourceManager, Dispatcher, RestEndpoint, JobManager for
each job) will have a separate ConfigMap.Constructor and Description |
---|
KubernetesLeaderElectionDriver(FlinkKubeClient kubeClient,
KubernetesConfigMapSharedWatcher configMapSharedWatcher,
ExecutorService watchExecutorService,
KubernetesLeaderElectionConfiguration leaderConfig,
LeaderElectionEventHandler leaderElectionEventHandler,
FatalErrorHandler fatalErrorHandler)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
|
boolean |
hasLeadership()
Deprecated.
Check whether the driver still have the leadership in the distributed coordination system.
|
String |
toString()
Deprecated.
|
void |
writeLeaderInformation(LeaderInformation leaderInformation)
Deprecated.
Write the current leader information to external persistent storage(e.g.
|
public KubernetesLeaderElectionDriver(FlinkKubeClient kubeClient, KubernetesConfigMapSharedWatcher configMapSharedWatcher, ExecutorService watchExecutorService, KubernetesLeaderElectionConfiguration leaderConfig, LeaderElectionEventHandler leaderElectionEventHandler, FatalErrorHandler fatalErrorHandler)
public void close()
close
in interface AutoCloseable
public void writeLeaderInformation(LeaderInformation leaderInformation)
LeaderElectionDriver
writeLeaderInformation
in interface LeaderElectionDriver
leaderInformation
- current leader information. It could be LeaderInformation.empty()
, which means the caller want to clear the leader information
on external storage. Please remember that the clear operation should only happen before a
new leader is elected and has written his leader information on the storage. Otherwise,
we may have a risk to wrongly update the storage with empty leader information.public boolean hasLeadership()
LeaderElectionDriver
hasLeadership
in interface LeaderElectionDriver
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.