Interface JobTable.Job

Enclosing interface:
JobTable

public static interface JobTable.Job
A job contains services which are bound to the lifetime of a Flink job. Moreover, it can be connected to a leading JobManager and then store further services which are bound to the lifetime of the JobManager connection.

Accessing any methods after a job has been closed will throw an IllegalStateException.

  • Method Details

    • isConnected

      boolean isConnected()
      Returns true if the job is connected to a JobManager.
      Returns:
      true if the job is connected to a JobManager, otherwise false
    • getJobId

      org.apache.flink.api.common.JobID getJobId()
      Returns the JobID which is associated with this job.
      Returns:
      job id which is associated with this job
    • asConnection

      Optional<JobTable.Connection> asConnection()
      Returns the associated JobTable.Connection if the job is connected to a JobManager.
      Returns:
      an Optional containing the associated JobTable.Connection instance if the job is connected to a leading JobManager, or an empty Optional if the job is not connected
    • connect

      JobTable.Connection connect(ResourceID resourceId, JobMasterGateway jobMasterGateway, TaskManagerActions taskManagerActions, CheckpointResponder checkpointResponder, GlobalAggregateManager aggregateManager, PartitionProducerStateChecker partitionStateChecker)
      Connects the job to a JobManager and associates the provided services with this connection.

      A job can only be connected iff Job#isConnected() == false.

      Parameters:
      resourceId - resourceId of the JobManager to connect to
      jobMasterGateway - jobMasterGateway of the JobManager to connect to
      taskManagerActions - taskManagerActions associated with this connection
      checkpointResponder - checkpointResponder associated with this connection
      aggregateManager - aggregateManager associated with this connection
      partitionStateChecker - partitionStateChecker associated with this connection
      Returns:
      the established JobTable.Connection
      Throws:
      IllegalStateException - if the job is already connected
    • close

      void close()
      Closes this job and removes it from the owning JobTable.