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
EmbeddedHaServices
extension 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 CheckpointRecoveryFactory
getCheckpointRecoveryFactory()
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:
revokeDispatcherLeadership
in interfaceHaLeadershipControl
-
grantDispatcherLeadership
public CompletableFuture<Void> grantDispatcherLeadership()
- Specified by:
grantDispatcherLeadership
in interfaceHaLeadershipControl
-
revokeJobMasterLeadership
public CompletableFuture<Void> revokeJobMasterLeadership(org.apache.flink.api.common.JobID jobId)
- Specified by:
revokeJobMasterLeadership
in interfaceHaLeadershipControl
-
grantJobMasterLeadership
public CompletableFuture<Void> grantJobMasterLeadership(org.apache.flink.api.common.JobID jobId)
- Specified by:
grantJobMasterLeadership
in interfaceHaLeadershipControl
-
revokeResourceManagerLeadership
public CompletableFuture<Void> revokeResourceManagerLeadership()
- Specified by:
revokeResourceManagerLeadership
in interfaceHaLeadershipControl
-
grantResourceManagerLeadership
public CompletableFuture<Void> grantResourceManagerLeadership()
- Specified by:
grantResourceManagerLeadership
in interfaceHaLeadershipControl
-
getCheckpointRecoveryFactory
public CheckpointRecoveryFactory getCheckpointRecoveryFactory()
Description copied from interface:HighAvailabilityServices
Gets the checkpoint recovery factory for the job manager.- Specified by:
getCheckpointRecoveryFactory
in interfaceHighAvailabilityServices
- Overrides:
getCheckpointRecoveryFactory
in classAbstractNonHaServices
- Returns:
- Checkpoint recovery factory
-
-