public class DataflowPipelineTranslator
extends java.lang.Object
DataflowPipelineTranslator
knows how to translate Pipeline
objects into Cloud
Dataflow Service API Job
s.Modifier and Type | Class and Description |
---|---|
static class |
DataflowPipelineTranslator.JobSpecification
The result of a job translation.
|
Modifier and Type | Method and Description |
---|---|
static DataflowPipelineTranslator |
fromOptions(DataflowPipelineOptions options)
Constructs a translator from the provided options.
|
<TransformT extends PTransform> |
getTransformTranslator(java.lang.Class<TransformT> transformClass)
Returns the
TransformTranslator to use for instances of the specified PTransform class,
or null if none registered. |
static java.lang.String |
jobToString(Job job)
Renders a
Job as a string. |
static <TransformT extends PTransform> |
registerTransformTranslator(java.lang.Class<TransformT> transformClass,
TransformTranslator<? extends TransformT> transformTranslator)
Records that instances of the specified PTransform class should be translated by default by the
corresponding
TransformTranslator . |
java.lang.String |
toString() |
DataflowPipelineTranslator.JobSpecification |
translate(Pipeline pipeline,
org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline pipelineProto,
org.apache.beam.runners.core.construction.SdkComponents sdkComponents,
DataflowRunner runner,
java.util.List<DataflowPackage> packages)
Translates a
Pipeline into a JobSpecification . |
public static DataflowPipelineTranslator fromOptions(DataflowPipelineOptions options)
options
- Properties that configure the translator.public DataflowPipelineTranslator.JobSpecification translate(Pipeline pipeline, org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline pipelineProto, org.apache.beam.runners.core.construction.SdkComponents sdkComponents, DataflowRunner runner, java.util.List<DataflowPackage> packages)
Pipeline
into a JobSpecification
.public static <TransformT extends PTransform> void registerTransformTranslator(java.lang.Class<TransformT> transformClass, TransformTranslator<? extends TransformT> transformTranslator)
TransformTranslator
.public <TransformT extends PTransform> TransformTranslator<TransformT> getTransformTranslator(java.lang.Class<TransformT> transformClass)
TransformTranslator
to use for instances of the specified PTransform class,
or null if none registered.public java.lang.String toString()
toString
in class java.lang.Object