public class FlinkJobInvocation extends java.lang.Object implements JobInvocation
FlinkRunner
.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.JobState.Enum> stateStreamObserver)
Listen for job state changes with a
Consumer . |
void |
cancel()
Cancel the job.
|
static FlinkJobInvocation |
create(java.lang.String id,
java.lang.String retrievalToken,
org.apache.beam.vendor.guava.v20_0.com.google.common.util.concurrent.ListeningExecutorService executorService,
org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline pipeline,
FlinkPipelineOptions pipelineOptions,
java.lang.String confDir,
java.util.List<java.lang.String> filesToStage) |
java.lang.String |
getId() |
org.apache.beam.model.jobmanagement.v1.JobApi.JobState.Enum |
getState()
Retrieve the job's current state.
|
void |
start()
Start the job.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isTerminated
public static FlinkJobInvocation create(java.lang.String id, java.lang.String retrievalToken, org.apache.beam.vendor.guava.v20_0.com.google.common.util.concurrent.ListeningExecutorService executorService, org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline pipeline, FlinkPipelineOptions pipelineOptions, @Nullable java.lang.String confDir, java.util.List<java.lang.String> filesToStage)
public void start()
JobInvocation
start
in interface JobInvocation
public java.lang.String getId()
getId
in interface JobInvocation
public void cancel()
JobInvocation
cancel
in interface JobInvocation
public org.apache.beam.model.jobmanagement.v1.JobApi.JobState.Enum getState()
JobInvocation
getState
in interface JobInvocation
public void addStateListener(java.util.function.Consumer<org.apache.beam.model.jobmanagement.v1.JobApi.JobState.Enum> stateStreamObserver)
JobInvocation
Consumer
.addStateListener
in interface JobInvocation
public void addMessageListener(java.util.function.Consumer<org.apache.beam.model.jobmanagement.v1.JobApi.JobMessage> messageStreamObserver)
JobInvocation
Consumer
.addMessageListener
in interface JobInvocation