Class CheckpointResourcesCleanupRunner
- java.lang.Object
-
- org.apache.flink.runtime.dispatcher.cleanup.CheckpointResourcesCleanupRunner
-
- All Implemented Interfaces:
AutoCloseable,JobManagerRunner,org.apache.flink.util.AutoCloseableAsync
public class CheckpointResourcesCleanupRunner extends Object implements JobManagerRunner
CheckpointResourcesCleanupRunnerimplementsJobManagerRunnerin a way, that only the checkpoint-related resources are instantiated. It triggers any job-specific cleanup that's usually performed by theJobMasterwithout rebuilding the correspondingExecutionGraph.
-
-
Constructor Summary
Constructors Constructor Description CheckpointResourcesCleanupRunner(JobResult jobResult, CheckpointRecoveryFactory checkpointRecoveryFactory, SharedStateRegistryFactory sharedStateRegistryFactory, org.apache.flink.configuration.Configuration jobManagerConfiguration, Executor cleanupExecutor, long initializationTimestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Acknowledge>cancel(Duration timeout)Cancels the currently executed job.CompletableFuture<Void>closeAsync()org.apache.flink.api.common.JobIDgetJobID()Get the job id of the executed job.CompletableFuture<JobMasterGateway>getJobMasterGateway()Get theJobMasterGatewayof theJobMaster.CompletableFuture<JobManagerRunnerResult>getResultFuture()Get the result future of this runner.booleanisInitialized()Flag indicating if the JobManagerRunner has been initialized.CompletableFuture<ExecutionGraphInfo>requestJob(Duration timeout)Requests theExecutionGraphInfoof the executed job.CompletableFuture<JobDetails>requestJobDetails(Duration timeout)Request the details of the executed job.CompletableFuture<org.apache.flink.api.common.JobStatus>requestJobStatus(Duration timeout)Requests the current job status.voidstart()Start the execution of theJobMaster.
-
-
-
Constructor Detail
-
CheckpointResourcesCleanupRunner
public CheckpointResourcesCleanupRunner(JobResult jobResult, CheckpointRecoveryFactory checkpointRecoveryFactory, SharedStateRegistryFactory sharedStateRegistryFactory, org.apache.flink.configuration.Configuration jobManagerConfiguration, Executor cleanupExecutor, long initializationTimestamp)
-
-
Method Detail
-
closeAsync
public CompletableFuture<Void> closeAsync()
- Specified by:
closeAsyncin interfaceorg.apache.flink.util.AutoCloseableAsync
-
start
public void start() throws ExceptionDescription copied from interface:JobManagerRunnerStart the execution of theJobMaster.- Specified by:
startin interfaceJobManagerRunner- Throws:
Exception- if the JobMaster cannot be started
-
getJobMasterGateway
public CompletableFuture<JobMasterGateway> getJobMasterGateway()
Description copied from interface:JobManagerRunnerGet theJobMasterGatewayof theJobMaster. The future is only completed if the JobMaster becomes leader.- Specified by:
getJobMasterGatewayin interfaceJobManagerRunner- Returns:
- Future with the JobMasterGateway once the underlying JobMaster becomes leader
-
getResultFuture
public CompletableFuture<JobManagerRunnerResult> getResultFuture()
Description copied from interface:JobManagerRunnerGet the result future of this runner. The future is completed once the executed job reaches a globally terminal state or if the initialization of theJobMasterfails. If the result future is completed exceptionally viaJobNotFinishedException, then this signals that the job has not been completed successfully. All other exceptional completions denote an unexpected exception which leads to a process restart.- Specified by:
getResultFuturein interfaceJobManagerRunner- Returns:
- Future which is completed with the job result
-
getJobID
public org.apache.flink.api.common.JobID getJobID()
Description copied from interface:JobManagerRunnerGet the job id of the executed job.- Specified by:
getJobIDin interfaceJobManagerRunner- Returns:
- job id of the executed job
-
cancel
public CompletableFuture<Acknowledge> cancel(Duration timeout)
Description copied from interface:JobManagerRunnerCancels the currently executed job.- Specified by:
cancelin interfaceJobManagerRunner- Parameters:
timeout- of this operation- Returns:
- Future acknowledge of the operation
-
requestJobStatus
public CompletableFuture<org.apache.flink.api.common.JobStatus> requestJobStatus(Duration timeout)
Description copied from interface:JobManagerRunnerRequests the current job status.- Specified by:
requestJobStatusin interfaceJobManagerRunner- Parameters:
timeout- for the rpc call- Returns:
- Future containing the current job status
-
requestJobDetails
public CompletableFuture<JobDetails> requestJobDetails(Duration timeout)
Description copied from interface:JobManagerRunnerRequest the details of the executed job.- Specified by:
requestJobDetailsin interfaceJobManagerRunner- Parameters:
timeout- for the rpc call- Returns:
- Future details of the executed job
-
requestJob
public CompletableFuture<ExecutionGraphInfo> requestJob(Duration timeout)
Description copied from interface:JobManagerRunnerRequests theExecutionGraphInfoof the executed job.- Specified by:
requestJobin interfaceJobManagerRunner- Parameters:
timeout- for the rpc call- Returns:
- Future which is completed with the
ExecutionGraphInfoof the executed job
-
isInitialized
public boolean isInitialized()
Description copied from interface:JobManagerRunnerFlag indicating if the JobManagerRunner has been initialized.- Specified by:
isInitializedin interfaceJobManagerRunner- Returns:
- true if the JobManagerRunner has been initialized.
-
-