public class FlinkBatchPortablePipelineTranslator extends java.lang.Object implements FlinkPortablePipelineTranslator<FlinkBatchPortablePipelineTranslator.BatchTranslationContext>
Example usage:
FlinkBatchPortablePipelineTranslator translator = FlinkBatchPortablePipelineTranslator.createTranslator(); BatchTranslationContext context = FlinkBatchPortablePipelineTranslator.createTranslationContext(jobInfo, confDir, filesToStage); translator.translate(context, pipeline); ExecutionEnvironment executionEnvironment = context.getExecutionEnvironment(); // Do something with executionEnvironment...
After translation the ExecutionEnvironment
in the translation context will contain the
full not-yet-executed pipeline DAG corresponding to the input pipeline.
Modifier and Type | Class and Description |
---|---|
static class |
FlinkBatchPortablePipelineTranslator.BatchTranslationContext
Batch translation context.
|
static class |
FlinkBatchPortablePipelineTranslator.IsFlinkNativeTransform
Predicate to determine whether a URN is a Flink native transform.
|
static interface |
FlinkBatchPortablePipelineTranslator.PTransformTranslator
Transform translation interface.
|
FlinkPortablePipelineTranslator.Executor, FlinkPortablePipelineTranslator.TranslationContext
Constructor and Description |
---|
FlinkBatchPortablePipelineTranslator(java.util.Map<java.lang.String,FlinkBatchPortablePipelineTranslator.PTransformTranslator> urnToTransformTranslator) |
Modifier and Type | Method and Description |
---|---|
static FlinkBatchPortablePipelineTranslator.BatchTranslationContext |
createTranslationContext(JobInfo jobInfo,
FlinkPipelineOptions pipelineOptions,
org.apache.flink.api.java.ExecutionEnvironment executionEnvironment) |
FlinkBatchPortablePipelineTranslator.BatchTranslationContext |
createTranslationContext(JobInfo jobInfo,
FlinkPipelineOptions pipelineOptions,
@Nullable java.lang.String confDir,
java.util.List<java.lang.String> filesToStage)
Creates a batch translation context.
|
static FlinkBatchPortablePipelineTranslator |
createTranslator()
Creates a batch translator.
|
static FlinkBatchPortablePipelineTranslator |
createTranslator(java.util.Map<java.lang.String,FlinkBatchPortablePipelineTranslator.PTransformTranslator> extraTranslations)
Creates a batch translator.
|
java.util.Set<java.lang.String> |
knownUrns() |
FlinkPortablePipelineTranslator.Executor |
translate(FlinkBatchPortablePipelineTranslator.BatchTranslationContext context,
org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline pipeline)
Translates the given pipeline.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
prepareForTranslation
public FlinkBatchPortablePipelineTranslator(java.util.Map<java.lang.String,FlinkBatchPortablePipelineTranslator.PTransformTranslator> urnToTransformTranslator)
public FlinkBatchPortablePipelineTranslator.BatchTranslationContext createTranslationContext(JobInfo jobInfo, FlinkPipelineOptions pipelineOptions, @Nullable java.lang.String confDir, java.util.List<java.lang.String> filesToStage)
ExecutionEnvironment
.createTranslationContext
in interface FlinkPortablePipelineTranslator<FlinkBatchPortablePipelineTranslator.BatchTranslationContext>
public static FlinkBatchPortablePipelineTranslator.BatchTranslationContext createTranslationContext(JobInfo jobInfo, FlinkPipelineOptions pipelineOptions, org.apache.flink.api.java.ExecutionEnvironment executionEnvironment)
public static FlinkBatchPortablePipelineTranslator createTranslator()
public static FlinkBatchPortablePipelineTranslator createTranslator(java.util.Map<java.lang.String,FlinkBatchPortablePipelineTranslator.PTransformTranslator> extraTranslations)
public java.util.Set<java.lang.String> knownUrns()
knownUrns
in interface FlinkPortablePipelineTranslator<FlinkBatchPortablePipelineTranslator.BatchTranslationContext>
public FlinkPortablePipelineTranslator.Executor translate(FlinkBatchPortablePipelineTranslator.BatchTranslationContext context, org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline pipeline)
FlinkPortablePipelineTranslator
translate
in interface FlinkPortablePipelineTranslator<FlinkBatchPortablePipelineTranslator.BatchTranslationContext>