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.
DataflowPipelineRunner, the Google cloudservices account and the Google compute engine
service account of the GCP project running the Dataflow Job will need access to the corresponding
source/sink.
Please see Google Cloud Dataflow Security and Permissions for more details.
| Modifier and Type | Class and Description |
|---|---|
static class |
DataflowPipelineRunner.StreamingPubsubIOWrite<T>
Specialized implementation for
PubsubIO.Write for the Dataflow runner in streaming
mode. |
| Modifier and Type | Field and Description |
|---|---|
static String |
PROJECT_ID_REGEXP
Project IDs must contain lowercase letters, digits, or dashes.
|
| Modifier | Constructor and Description |
|---|---|
protected |
DataflowPipelineRunner(DataflowPipelineOptions options) |
| Modifier and Type | Method and Description |
|---|---|
<OutputT extends POutput,InputT extends PInput> |
apply(PTransform<InputT,OutputT> transform,
InputT input)
Applies the given transform to the input.
|
protected static List<String> |
detectClassPathResourcesToStage(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. |
String |
toString() |
public static final String PROJECT_ID_REGEXP
protected DataflowPipelineRunner(DataflowPipelineOptions options)
public static DataflowPipelineRunner fromOptions(PipelineOptions options)
options - Properties that configure the runner.public <OutputT extends POutput,InputT extends PInput> OutputT apply(PTransform<InputT,OutputT> transform, InputT input)
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.protected static List<String> detectClassPathResourcesToStage(ClassLoader classLoader)
classLoader - The URLClassLoader to use to detect resources to stage.IllegalArgumentException - If either the class loader is not a URLClassLoader or one
of the resources the class loader exposes is not a file resource.