public class JobInvocation
extends java.lang.Object
Constructor and Description |
---|
JobInvocation(JobInfo jobInfo,
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.util.concurrent.ListeningExecutorService executorService,
org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline pipeline,
PortablePipelineRunner pipelineRunner) |
Modifier and Type | Method and Description |
---|---|
void |
addMessageListener(java.util.function.Consumer<org.apache.beam.model.jobmanagement.v1.JobApi.JobMessage> messageStreamObserver)
Listen for job messages with a
Consumer . |
void |
addStateListener(java.util.function.Consumer<org.apache.beam.model.jobmanagement.v1.JobApi.JobStateEvent> stateStreamObserver)
Listen for job state changes with a
Consumer . |
void |
cancel()
Cancel the job.
|
java.lang.String |
getId() |
org.apache.beam.model.jobmanagement.v1.JobApi.MetricResults |
getMetrics() |
org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline |
getPipeline()
Retrieve the job's pipeline.
|
org.apache.beam.model.jobmanagement.v1.JobApi.JobState.Enum |
getState()
Retrieve the job's current state.
|
org.apache.beam.model.jobmanagement.v1.JobApi.JobStateEvent |
getStateEvent()
Retrieve the job's current state.
|
static java.lang.Boolean |
isTerminated(org.apache.beam.model.jobmanagement.v1.JobApi.JobState.Enum state) |
void |
start()
Start the job.
|
org.apache.beam.model.jobmanagement.v1.JobApi.JobInfo |
toProto()
Convert to
JobApi.JobInfo . |
public JobInvocation(JobInfo jobInfo, org.apache.beam.vendor.guava.v26_0_jre.com.google.common.util.concurrent.ListeningExecutorService executorService, org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline pipeline, PortablePipelineRunner pipelineRunner)
public void start()
public java.lang.String getId()
public void cancel()
public org.apache.beam.model.jobmanagement.v1.JobApi.MetricResults getMetrics()
public org.apache.beam.model.jobmanagement.v1.JobApi.JobState.Enum getState()
public org.apache.beam.model.jobmanagement.v1.JobApi.JobStateEvent getStateEvent()
public org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline getPipeline()
public void addStateListener(java.util.function.Consumer<org.apache.beam.model.jobmanagement.v1.JobApi.JobStateEvent> stateStreamObserver)
Consumer
.public void addMessageListener(java.util.function.Consumer<org.apache.beam.model.jobmanagement.v1.JobApi.JobMessage> messageStreamObserver)
Consumer
.public org.apache.beam.model.jobmanagement.v1.JobApi.JobInfo toProto()
JobApi.JobInfo
.public static java.lang.Boolean isTerminated(org.apache.beam.model.jobmanagement.v1.JobApi.JobState.Enum state)