Interface JobManagerRunner
-
- All Superinterfaces:
AutoCloseable,org.apache.flink.util.AutoCloseableAsync
- All Known Implementing Classes:
CheckpointResourcesCleanupRunner,JobMasterServiceLeadershipRunner
public interface JobManagerRunner extends org.apache.flink.util.AutoCloseableAsyncInterface for a runner which executes aJobMaster.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<Acknowledge>cancel(Duration timeout)Cancels the currently executed job.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.
-
-
-
Method Detail
-
start
void start() throws ExceptionStart the execution of theJobMaster.- Throws:
Exception- if the JobMaster cannot be started
-
getJobMasterGateway
CompletableFuture<JobMasterGateway> getJobMasterGateway()
Get theJobMasterGatewayof theJobMaster. The future is only completed if the JobMaster becomes leader.- Returns:
- Future with the JobMasterGateway once the underlying JobMaster becomes leader
-
getResultFuture
CompletableFuture<JobManagerRunnerResult> getResultFuture()
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 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.- Returns:
- Future which is completed with the job result
-
getJobID
org.apache.flink.api.common.JobID getJobID()
Get the job id of the executed job.- Returns:
- job id of the executed job
-
cancel
CompletableFuture<Acknowledge> cancel(Duration timeout)
Cancels the currently executed job.- Parameters:
timeout- of this operation- Returns:
- Future acknowledge of the operation
-
requestJobStatus
CompletableFuture<org.apache.flink.api.common.JobStatus> requestJobStatus(Duration timeout)
Requests the current job status.- Parameters:
timeout- for the rpc call- Returns:
- Future containing the current job status
-
requestJobDetails
CompletableFuture<JobDetails> requestJobDetails(Duration timeout)
Request the details of the executed job.- Parameters:
timeout- for the rpc call- Returns:
- Future details of the executed job
-
requestJob
CompletableFuture<ExecutionGraphInfo> requestJob(Duration timeout)
Requests theExecutionGraphInfoof the executed job.- Parameters:
timeout- for the rpc call- Returns:
- Future which is completed with the
ExecutionGraphInfoof the executed job
-
isInitialized
boolean isInitialized()
Flag indicating if the JobManagerRunner has been initialized.- Returns:
- true if the JobManagerRunner has been initialized.
-
-