Class JobInvocation

java.lang.Object
org.apache.beam.runners.jobsubmission.JobInvocation

public class JobInvocation extends Object
Internal representation of a Job which has been invoked (prepared and run) by a client.
  • Constructor Summary

    Constructors
    Constructor
    Description
    JobInvocation(JobInfo jobInfo, org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.util.concurrent.ListeningExecutorService executorService, org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline pipeline, PortablePipelineRunner pipelineRunner)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addMessageListener(Consumer<org.apache.beam.model.jobmanagement.v1.JobApi.JobMessage> messageStreamObserver)
    Listen for job messages with a Consumer.
    void
    addStateListener(Consumer<org.apache.beam.model.jobmanagement.v1.JobApi.JobStateEvent> stateStreamObserver)
    Listen for job state changes with a Consumer.
    void
    Cancel the job.
     
    org.apache.beam.model.jobmanagement.v1.JobApi.MetricResults
     
    org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline
    Retrieve the job's pipeline.
    org.apache.beam.model.jobmanagement.v1.JobApi.JobState.Enum
    Retrieve the job's current state.
    org.apache.beam.model.jobmanagement.v1.JobApi.JobStateEvent
    Retrieve the job's current state.
    static Boolean
    isTerminated(org.apache.beam.model.jobmanagement.v1.JobApi.JobState.Enum state)
     
    void
    Start the job.
    org.apache.beam.model.jobmanagement.v1.JobApi.JobInfo
    Convert to JobApi.JobInfo.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JobInvocation

      public JobInvocation(JobInfo jobInfo, org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.util.concurrent.ListeningExecutorService executorService, org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline pipeline, PortablePipelineRunner pipelineRunner)
  • Method Details

    • start

      public void start()
      Start the job.
    • getId

      public String getId()
      Returns:
      Unique identifier for the job invocation.
    • cancel

      public void cancel()
      Cancel the job.
    • getMetrics

      public org.apache.beam.model.jobmanagement.v1.JobApi.MetricResults getMetrics()
    • getState

      public org.apache.beam.model.jobmanagement.v1.JobApi.JobState.Enum getState()
      Retrieve the job's current state.
    • getStateEvent

      public org.apache.beam.model.jobmanagement.v1.JobApi.JobStateEvent getStateEvent()
      Retrieve the job's current state.
    • getPipeline

      public org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline getPipeline()
      Retrieve the job's pipeline.
    • addStateListener

      public void addStateListener(Consumer<org.apache.beam.model.jobmanagement.v1.JobApi.JobStateEvent> stateStreamObserver)
      Listen for job state changes with a Consumer.
    • addMessageListener

      public void addMessageListener(Consumer<org.apache.beam.model.jobmanagement.v1.JobApi.JobMessage> messageStreamObserver)
      Listen for job messages with a Consumer.
    • toProto

      public org.apache.beam.model.jobmanagement.v1.JobApi.JobInfo toProto()
      Convert to JobApi.JobInfo.
    • isTerminated

      public static Boolean isTerminated(org.apache.beam.model.jobmanagement.v1.JobApi.JobState.Enum state)