Class EmbeddedHaServicesWithLeadershipControl
- java.lang.Object
-
- org.apache.flink.runtime.highavailability.nonha.AbstractNonHaServices
-
- org.apache.flink.runtime.highavailability.nonha.embedded.EmbeddedHaServices
-
- org.apache.flink.runtime.highavailability.nonha.embedded.EmbeddedHaServicesWithLeadershipControl
-
- All Implemented Interfaces:
AutoCloseable,GloballyCleanableResource,ClientHighAvailabilityServices,HighAvailabilityServices,HaLeadershipControl
public class EmbeddedHaServicesWithLeadershipControl extends EmbeddedHaServices implements HaLeadershipControl
EmbeddedHaServicesextension to expose leadership granting and revoking.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.highavailability.nonha.AbstractNonHaServices
lock
-
Fields inherited from interface org.apache.flink.runtime.highavailability.HighAvailabilityServices
DEFAULT_JOB_ID, DEFAULT_LEADER_ID
-
-
Constructor Summary
Constructors Constructor Description EmbeddedHaServicesWithLeadershipControl(Executor executor)EmbeddedHaServicesWithLeadershipControl(Executor executor, CheckpointRecoveryFactory checkpointRecoveryFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckpointRecoveryFactorygetCheckpointRecoveryFactory()Gets the checkpoint recovery factory for the job manager.CompletableFuture<Void>grantDispatcherLeadership()CompletableFuture<Void>grantJobMasterLeadership(org.apache.flink.api.common.JobID jobId)CompletableFuture<Void>grantResourceManagerLeadership()CompletableFuture<Void>revokeDispatcherLeadership()CompletableFuture<Void>revokeJobMasterLeadership(org.apache.flink.api.common.JobID jobId)CompletableFuture<Void>revokeResourceManagerLeadership()-
Methods inherited from class org.apache.flink.runtime.highavailability.nonha.embedded.EmbeddedHaServices
close, getClusterRestEndpointLeaderElection, getClusterRestEndpointLeaderRetriever, getDispatcherLeaderElection, getDispatcherLeaderRetriever, getJobManagerLeaderElection, getJobManagerLeaderRetriever, getJobManagerLeaderRetriever, getResourceManagerLeaderElection, getResourceManagerLeaderRetriever
-
Methods inherited from class org.apache.flink.runtime.highavailability.nonha.AbstractNonHaServices
checkNotShutdown, cleanupAllData, createBlobStore, getExecutionPlanStore, getJobResultStore, isShutDown
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.runtime.highavailability.HighAvailabilityServices
closeWithOptionalClean, getWebMonitorLeaderElection, getWebMonitorLeaderRetriever, globalCleanupAsync
-
-
-
-
Constructor Detail
-
EmbeddedHaServicesWithLeadershipControl
public EmbeddedHaServicesWithLeadershipControl(Executor executor)
-
EmbeddedHaServicesWithLeadershipControl
public EmbeddedHaServicesWithLeadershipControl(Executor executor, CheckpointRecoveryFactory checkpointRecoveryFactory)
-
-
Method Detail
-
revokeDispatcherLeadership
public CompletableFuture<Void> revokeDispatcherLeadership()
- Specified by:
revokeDispatcherLeadershipin interfaceHaLeadershipControl
-
grantDispatcherLeadership
public CompletableFuture<Void> grantDispatcherLeadership()
- Specified by:
grantDispatcherLeadershipin interfaceHaLeadershipControl
-
revokeJobMasterLeadership
public CompletableFuture<Void> revokeJobMasterLeadership(org.apache.flink.api.common.JobID jobId)
- Specified by:
revokeJobMasterLeadershipin interfaceHaLeadershipControl
-
grantJobMasterLeadership
public CompletableFuture<Void> grantJobMasterLeadership(org.apache.flink.api.common.JobID jobId)
- Specified by:
grantJobMasterLeadershipin interfaceHaLeadershipControl
-
revokeResourceManagerLeadership
public CompletableFuture<Void> revokeResourceManagerLeadership()
- Specified by:
revokeResourceManagerLeadershipin interfaceHaLeadershipControl
-
grantResourceManagerLeadership
public CompletableFuture<Void> grantResourceManagerLeadership()
- Specified by:
grantResourceManagerLeadershipin interfaceHaLeadershipControl
-
getCheckpointRecoveryFactory
public CheckpointRecoveryFactory getCheckpointRecoveryFactory()
Description copied from interface:HighAvailabilityServicesGets the checkpoint recovery factory for the job manager.- Specified by:
getCheckpointRecoveryFactoryin interfaceHighAvailabilityServices- Overrides:
getCheckpointRecoveryFactoryin classAbstractNonHaServices- Returns:
- Checkpoint recovery factory
-
-