public class DirectPipelineRunner extends PipelineRunner<DirectPipelineRunner.EvaluationResults>
Throws an exception from run(com.google.cloud.dataflow.sdk.Pipeline) if execution fails.
DirectPipelineRunner, the Cloud Platform account that you configured with the
gcloud executable 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 interface |
DirectPipelineRunner.EvaluationContext
The interface provided to registered callbacks for interacting
with the
DirectPipelineRunner, including reading and writing the
values of PCollections and PCollectionViews. |
static interface |
DirectPipelineRunner.EvaluationResults
The interface provided to registered callbacks for interacting
with the
DirectPipelineRunner, including reading and writing the
values of PCollections and PCollectionViews. |
static class |
DirectPipelineRunner.TestCombineDoFn<K,InputT,AccumT,OutputT>
The implementation may split the
Combine.KeyedCombineFn into ADD, MERGE and EXTRACT phases (
see com.google.cloud.dataflow.sdk.runners.worker.CombineValuesFn). |
static interface |
DirectPipelineRunner.TransformEvaluator<TransformT extends PTransform>
An evaluator of a PTransform.
|
static class |
DirectPipelineRunner.ValueWithMetadata<V>
An immutable (value, timestamp) pair, along with other metadata necessary
for the implementation of
DirectPipelineRunner. |
| Modifier and Type | Method and Description |
|---|---|
<OutputT extends POutput,InputT extends PInput> |
apply(PTransform<InputT,OutputT> transform,
InputT input)
Applies a transform to the given input, returning the output.
|
static DirectPipelineRunner |
createForTest()
Constructs a runner with default properties for testing.
|
static DirectPipelineRunner |
fromOptions(PipelineOptions options)
Constructs a DirectPipelineRunner from the given options.
|
DirectPipelineOptions |
getPipelineOptions() |
<TransformT extends PTransform<?,?>> |
getTransformEvaluator(Class<TransformT> transformClass)
Returns the TransformEvaluator to use for instances of the
specified PTransform class, or null if none registered.
|
static <TransformT extends PTransform<?,?>> |
registerDefaultTransformEvaluator(Class<TransformT> transformClass,
DirectPipelineRunner.TransformEvaluator<? super TransformT> transformEvaluator)
Records that instances of the specified PTransform class
should be evaluated by default by the corresponding
TransformEvaluator.
|
<TransformT extends PTransform<?,?>> |
registerTransformEvaluator(Class<TransformT> transformClass,
DirectPipelineRunner.TransformEvaluator<TransformT> transformEvaluator)
Records that instances of the specified PTransform class
should be evaluated by the corresponding TransformEvaluator.
|
DirectPipelineRunner.EvaluationResults |
run(Pipeline pipeline)
Processes the given Pipeline, returning the results.
|
String |
toString() |
DirectPipelineRunner |
withEncodabilityTesting(boolean enable)
Enable runtime testing to verify that all values can be encoded.
|
DirectPipelineRunner |
withSerializabilityTesting(boolean enable)
Enable runtime testing to verify that all functions and
Coder
instances can be serialized. |
DirectPipelineRunner |
withUnorderednessTesting(boolean enable)
Enable runtime testing to verify that functions do not depend on order
of the elements.
|
public static <TransformT extends PTransform<?,?>> void registerDefaultTransformEvaluator(Class<TransformT> transformClass, DirectPipelineRunner.TransformEvaluator<? super TransformT> transformEvaluator)
public <TransformT extends PTransform<?,?>> void registerTransformEvaluator(Class<TransformT> transformClass, DirectPipelineRunner.TransformEvaluator<TransformT> transformEvaluator)
registerDefaultTransformEvaluator(java.lang.Class<TransformT>, com.google.cloud.dataflow.sdk.runners.DirectPipelineRunner.TransformEvaluator<? super TransformT>).public <TransformT extends PTransform<?,?>> DirectPipelineRunner.TransformEvaluator<TransformT> getTransformEvaluator(Class<TransformT> transformClass)
public static DirectPipelineRunner fromOptions(PipelineOptions options)
public static DirectPipelineRunner createForTest()
public DirectPipelineRunner withSerializabilityTesting(boolean enable)
Coder
instances can be serialized.
Enabled by default.
This method modifies the DirectPipelineRunner instance and
returns itself.
public DirectPipelineRunner withEncodabilityTesting(boolean enable)
Enabled by default.
This method modifies the DirectPipelineRunner instance and
returns itself.
public DirectPipelineRunner withUnorderednessTesting(boolean enable)
This is accomplished by randomizing the order of elements.
Enabled by default.
This method modifies the DirectPipelineRunner instance and
returns itself.
public <OutputT extends POutput,InputT extends PInput> OutputT apply(PTransform<InputT,OutputT> transform, InputT input)
PipelineRunnerThe default implementation calls PTransform.apply(input), but can be overridden to customize behavior for a particular runner.
apply in class PipelineRunner<DirectPipelineRunner.EvaluationResults>public DirectPipelineRunner.EvaluationResults run(Pipeline pipeline)
PipelineRunnerrun in class PipelineRunner<DirectPipelineRunner.EvaluationResults>public DirectPipelineOptions getPipelineOptions()