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.
|
FlinkPortablePipelineTranslator.Executor, FlinkPortablePipelineTranslator.TranslationContext
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
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 createTranslator()
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>