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,
ListeningExecutorService executorService,
org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline pipeline,
FlinkPipelineOptions pipelineOptions,
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.
|
public static FlinkJobInvocation create(java.lang.String id, java.lang.String retrievalToken, ListeningExecutorService executorService, org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline pipeline, FlinkPipelineOptions pipelineOptions, 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