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
CheckpointResourcesCleanupRunner
implementsJobManagerRunner
in a way, that only the checkpoint-related resources are instantiated. It triggers any job-specific cleanup that's usually performed by theJobMaster
without 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.JobID
getJobID()
Get the job id of the executed job.CompletableFuture<JobMasterGateway>
getJobMasterGateway()
Get theJobMasterGateway
of theJobMaster
.CompletableFuture<JobManagerRunnerResult>
getResultFuture()
Get the result future of this runner.boolean
isInitialized()
Flag indicating if the JobManagerRunner has been initialized.CompletableFuture<ExecutionGraphInfo>
requestJob(Duration timeout)
Requests theExecutionGraphInfo
of 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.void
start()
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:
closeAsync
in interfaceorg.apache.flink.util.AutoCloseableAsync
-
start
public void start() throws Exception
Description copied from interface:JobManagerRunner
Start the execution of theJobMaster
.- Specified by:
start
in interfaceJobManagerRunner
- Throws:
Exception
- if the JobMaster cannot be started
-
getJobMasterGateway
public CompletableFuture<JobMasterGateway> getJobMasterGateway()
Description copied from interface:JobManagerRunner
Get theJobMasterGateway
of theJobMaster
. The future is only completed if the JobMaster becomes leader.- Specified by:
getJobMasterGateway
in interfaceJobManagerRunner
- Returns:
- Future with the JobMasterGateway once the underlying JobMaster becomes leader
-
getResultFuture
public CompletableFuture<JobManagerRunnerResult> getResultFuture()
Description copied from interface:JobManagerRunner
Get the result future of this runner. The future is completed once the executed job reaches a globally terminal state or if the initialization of theJobMaster
fails. 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:
getResultFuture
in interfaceJobManagerRunner
- Returns:
- Future which is completed with the job result
-
getJobID
public org.apache.flink.api.common.JobID getJobID()
Description copied from interface:JobManagerRunner
Get the job id of the executed job.- Specified by:
getJobID
in interfaceJobManagerRunner
- Returns:
- job id of the executed job
-
cancel
public CompletableFuture<Acknowledge> cancel(Duration timeout)
Description copied from interface:JobManagerRunner
Cancels the currently executed job.- Specified by:
cancel
in 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:JobManagerRunner
Requests the current job status.- Specified by:
requestJobStatus
in 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:JobManagerRunner
Request the details of the executed job.- Specified by:
requestJobDetails
in 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:JobManagerRunner
Requests theExecutionGraphInfo
of the executed job.- Specified by:
requestJob
in interfaceJobManagerRunner
- Parameters:
timeout
- for the rpc call- Returns:
- Future which is completed with the
ExecutionGraphInfo
of the executed job
-
isInitialized
public boolean isInitialized()
Description copied from interface:JobManagerRunner
Flag indicating if the JobManagerRunner has been initialized.- Specified by:
isInitialized
in interfaceJobManagerRunner
- Returns:
- true if the JobManagerRunner has been initialized.
-
-