public class DataflowRunner 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.
When reading from a Dataflow source or writing to a Dataflow sink using
DataflowRunner, 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 |
DataflowRunner.StreamingPCollectionViewWriterFn<T>
Deprecated.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROJECT_ID_REGEXP
Project IDs must contain lowercase letters, digits, or dashes.
|
| Modifier | Constructor and Description |
|---|---|
protected |
DataflowRunner(DataflowPipelineOptions options) |
| Modifier and Type | Method and Description |
|---|---|
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 DataflowRunner |
fromOptions(PipelineOptions options)
Construct a runner from the provided options.
|
DataflowPipelineTranslator |
getTranslator()
Returns the DataflowPipelineTranslator associated with this object.
|
static boolean |
hasExperiment(DataflowPipelineDebugOptions options,
java.lang.String experiment)
Returns true if the specified experiment is enabled, handling null experiments.
|
DataflowPipelineJob |
run(Pipeline pipeline)
Processes the given
Pipeline, potentially asynchronously, returning a runner-specific
type of result. |
void |
setHooks(DataflowRunnerHooks hooks)
Sets callbacks to invoke during execution see
DataflowRunnerHooks. |
java.lang.String |
toString() |
public static final java.lang.String PROJECT_ID_REGEXP
protected DataflowRunner(DataflowPipelineOptions options)
public static DataflowRunner fromOptions(PipelineOptions options)
options - Properties that configure the runner.public DataflowPipelineJob run(Pipeline pipeline)
PipelineRunnerPipeline, potentially asynchronously, returning a runner-specific
type of result.run in class PipelineRunner<DataflowPipelineJob>public static boolean hasExperiment(DataflowPipelineDebugOptions options, java.lang.String experiment)
public DataflowPipelineTranslator getTranslator()
@Experimental public void setHooks(DataflowRunnerHooks hooks)
DataflowRunnerHooks.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.