Interface JobManagerRunner
-
- All Superinterfaces:
AutoCloseable
,AutoCloseableAsync
- All Known Implementing Classes:
CheckpointResourcesCleanupRunner
,JobMasterServiceLeadershipRunner
public interface JobManagerRunner extends AutoCloseableAsync
Interface 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.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<JobStatus>
requestJobStatus(Duration timeout)
Requests the current job status.void
start()
Start the execution of theJobMaster
.-
Methods inherited from interface org.apache.flink.util.AutoCloseableAsync
close, closeAsync
-
-
-
-
Method Detail
-
start
void start() throws Exception
Start the execution of theJobMaster
.- Throws:
Exception
- if the JobMaster cannot be started
-
getJobMasterGateway
CompletableFuture<JobMasterGateway> getJobMasterGateway()
Get theJobMasterGateway
of 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 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.- Returns:
- Future which is completed with the job result
-
getJobID
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<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 theExecutionGraphInfo
of the executed job.- Parameters:
timeout
- for the rpc call- Returns:
- Future which is completed with the
ExecutionGraphInfo
of the executed job
-
isInitialized
boolean isInitialized()
Flag indicating if the JobManagerRunner has been initialized.- Returns:
- true if the JobManagerRunner has been initialized.
-
-