Interface JobManagerRunner

All Superinterfaces:
AutoCloseable, org.apache.flink.util.AutoCloseableAsync
All Known Implementing Classes:
CheckpointResourcesCleanupRunner, JobMasterServiceLeadershipRunner

public interface JobManagerRunner extends org.apache.flink.util.AutoCloseableAsync
Interface for a runner which executes a JobMaster.
  • Method Details

    • start

      void start() throws Exception
      Start the execution of the JobMaster.
      Throws:
      Exception - if the JobMaster cannot be started
    • getJobMasterGateway

      CompletableFuture<JobMasterGateway> getJobMasterGateway()
      Get the JobMasterGateway of the JobMaster. The future is only completed if the JobMaster becomes leader.
      Returns:
      Future with the JobMasterGateway once the underlying JobMaster becomes leader
    • 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 the JobMaster fails. If the result future is completed exceptionally via JobNotFinishedException, 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

      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

      Requests the ExecutionGraphInfo 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.