public class DataflowPipelineRunner extends PipelineRunner<DataflowPipelineJob>
PipelineRunner that executes the operations in the
pipeline by first translating them to the Dataflow representation
using the DataflowPipelineTranslator and then submitting
them to a Dataflow service for execution.| 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.
|
protected static java.util.List<java.lang.String> |
detectClassPathResourcesToStage(java.lang.ClassLoader classLoader)
Attempts to detect all the resources the class loader has access to.
|
static DataflowPipelineRunner |
fromOptions(PipelineOptions options)
Construct a runner from the provided options.
|
DataflowPipelineTranslator |
getTranslator()
Returns the DataflowPipelineTranslator associated with this object.
|
DataflowPipelineJob |
run(Pipeline pipeline)
Processes the given Pipeline, returning the results.
|
void |
setHooks(DataflowPipelineRunnerHooks hooks)
Sets callbacks to invoke during execution see
DataflowPipelineRunnerHooks. |
java.lang.String |
toString() |
public static DataflowPipelineRunner fromOptions(PipelineOptions options)
options - Properties that configure the runner.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<DataflowPipelineJob>public DataflowPipelineJob run(Pipeline pipeline)
PipelineRunnerrun in class PipelineRunner<DataflowPipelineJob>public DataflowPipelineTranslator getTranslator()
@Experimental public void setHooks(DataflowPipelineRunnerHooks hooks)
DataflowPipelineRunnerHooks.public java.lang.String toString()
toString in class java.lang.Objectprotected static java.util.List<java.lang.String> detectClassPathResourcesToStage(java.lang.ClassLoader classLoader)
classLoader - The URLClassLoader to use to detect resources to stage.java.lang.IllegalArgumentException - If either the class loader is not a URLClassLoader or one
of the resources the class loader exposes is not a file resource.