Class JobInvocation
java.lang.Object
org.apache.beam.runners.jobsubmission.JobInvocation
Internal representation of a Job which has been invoked (prepared and run) by a client.
- 
Constructor Summary
ConstructorsConstructorDescriptionJobInvocation(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 TypeMethodDescriptionvoidaddMessageListener(Consumer<org.apache.beam.model.jobmanagement.v1.JobApi.JobMessage> messageStreamObserver) Listen for job messages with aConsumer.voidaddStateListener(Consumer<org.apache.beam.model.jobmanagement.v1.JobApi.JobStateEvent> stateStreamObserver) Listen for job state changes with aConsumer.voidcancel()Cancel the job.getId()org.apache.beam.model.jobmanagement.v1.JobApi.MetricResultsorg.apache.beam.model.pipeline.v1.RunnerApi.PipelineRetrieve the job's pipeline.org.apache.beam.model.jobmanagement.v1.JobApi.JobState.EnumgetState()Retrieve the job's current state.org.apache.beam.model.jobmanagement.v1.JobApi.JobStateEventRetrieve the job's current state.static BooleanisTerminated(org.apache.beam.model.jobmanagement.v1.JobApi.JobState.Enum state) voidstart()Start the job.org.apache.beam.model.jobmanagement.v1.JobApi.JobInfotoProto()Convert toJobApi.JobInfo. 
- 
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
- 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 aConsumer. - 
addMessageListener
public void addMessageListener(Consumer<org.apache.beam.model.jobmanagement.v1.JobApi.JobMessage> messageStreamObserver) Listen for job messages with aConsumer. - 
toProto
public org.apache.beam.model.jobmanagement.v1.JobApi.JobInfo toProto()Convert toJobApi.JobInfo. - 
isTerminated
public static Boolean isTerminated(org.apache.beam.model.jobmanagement.v1.JobApi.JobState.Enum state)  
 -