public class BlockingDataflowPipelineRunner extends PipelineRunner<BlockingDataflowPipelineRunner.PipelineJobState>
DataflowPipelineRunner
but that waits for the launched job to finish.
Prints out job status updates and console messages while it waits.
Returns the final job state, or throws an exception if the job fails or cannot be monitored.
| Modifier and Type | Class and Description |
|---|---|
static class |
BlockingDataflowPipelineRunner.PipelineJobState
Holds the status of a run request.
|
| Modifier | Constructor and Description |
|---|---|
protected |
BlockingDataflowPipelineRunner(DataflowPipelineRunner internalRunner,
com.google.cloud.dataflow.sdk.util.MonitoringUtil.JobMessagesHandler jobMessagesHandler) |
| Modifier and Type | Method and Description |
|---|---|
<Output extends POutput,Input extends PInput> |
apply(PTransform<Input,Output> transform,
Input input)
Applies a transform to the given input, returning the output.
|
static BlockingDataflowPipelineRunner |
fromOptions(PipelineOptions options)
Constructs a runner from the provided options.
|
BlockingDataflowPipelineRunner.PipelineJobState |
run(Pipeline p)
Processes the given Pipeline, returning the results.
|
void |
setHooks(DataflowPipelineRunnerHooks hooks)
Sets callbacks to invoke during execution see
DataflowPipelineRunnerHooks. |
protected BlockingDataflowPipelineRunner(DataflowPipelineRunner internalRunner, com.google.cloud.dataflow.sdk.util.MonitoringUtil.JobMessagesHandler jobMessagesHandler)
public static BlockingDataflowPipelineRunner fromOptions(PipelineOptions options)
public BlockingDataflowPipelineRunner.PipelineJobState run(Pipeline p)
PipelineRunnerrun in class PipelineRunner<BlockingDataflowPipelineRunner.PipelineJobState>public <Output extends POutput,Input extends PInput> Output apply(PTransform<Input,Output> transform, Input input)
PipelineRunnerThe default implementation calls PTransform.apply(input), but can be overridden to customize behavior for a particular runner.
apply in class PipelineRunner<BlockingDataflowPipelineRunner.PipelineJobState>public void setHooks(DataflowPipelineRunnerHooks hooks)
DataflowPipelineRunnerHooks.
Important: setHooks is experimental. Please consult with the Dataflow team before using it.
You should expect this class to change significantly in future versions of the SDK or be
removed entirely.