Interface Executor
@Internal
public interface Executor
It enables the execution of a graph of
Transformations generated by the Planner.
This uncouples the TableEnvironment from any given runtime.
Note that not every table program calls createPipeline(List, ReadableConfig, String)
or execute(Pipeline). When bridging to DataStream API, this interface serves as a
communication layer to the final pipeline executor via StreamExecutionEnvironment.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.flink.api.dag.PipelinecreatePipeline(List<org.apache.flink.api.dag.Transformation<?>> transformations, org.apache.flink.configuration.ReadableConfig tableConfiguration, String defaultJobName) Translates the given transformations to aPipeline.org.apache.flink.api.dag.PipelinecreatePipeline(List<org.apache.flink.api.dag.Transformation<?>> transformations, org.apache.flink.configuration.ReadableConfig tableConfiguration, String defaultJobName, List<org.apache.flink.core.execution.JobStatusHook> jobStatusHookList) Translates the given transformations with a list ofJobStatusHooks to aPipeline.org.apache.flink.api.common.JobExecutionResultexecute(org.apache.flink.api.dag.Pipeline pipeline) Executes the given pipeline.org.apache.flink.core.execution.JobClientexecuteAsync(org.apache.flink.api.dag.Pipeline pipeline) Executes the given pipeline asynchronously.org.apache.flink.configuration.ReadableConfigGives read-only access to the configuration of the executor.booleanChecks whether checkpointing is enabled.
-
Method Details
-
getConfiguration
org.apache.flink.configuration.ReadableConfig getConfiguration()Gives read-only access to the configuration of the executor. -
createPipeline
org.apache.flink.api.dag.Pipeline createPipeline(List<org.apache.flink.api.dag.Transformation<?>> transformations, org.apache.flink.configuration.ReadableConfig tableConfiguration, @Nullable String defaultJobName) Translates the given transformations to aPipeline.- Parameters:
transformations- list of transformationstableConfiguration- table-specific configuration optionsdefaultJobName- default job name if not specified viaPipelineOptions.NAME- Returns:
- The pipeline representing the transformations.
-
createPipeline
org.apache.flink.api.dag.Pipeline createPipeline(List<org.apache.flink.api.dag.Transformation<?>> transformations, org.apache.flink.configuration.ReadableConfig tableConfiguration, @Nullable String defaultJobName, List<org.apache.flink.core.execution.JobStatusHook> jobStatusHookList) Translates the given transformations with a list ofJobStatusHooks to aPipeline.- Parameters:
transformations- list of transformationstableConfiguration- table-specific configuration optionsdefaultJobName- default job name if not specified viaPipelineOptions.NAMEjobStatusHookList- list ofJobStatusHooks- Returns:
- The pipeline representing the transformations.
-
execute
org.apache.flink.api.common.JobExecutionResult execute(org.apache.flink.api.dag.Pipeline pipeline) throws Exception Executes the given pipeline.- Parameters:
pipeline- the pipeline to execute- Returns:
- The result of the job execution, containing elapsed time and accumulators.
- Throws:
Exception- which occurs during job execution.
-
executeAsync
org.apache.flink.core.execution.JobClient executeAsync(org.apache.flink.api.dag.Pipeline pipeline) throws Exception Executes the given pipeline asynchronously.- Parameters:
pipeline- the pipeline to execute- Returns:
- A
JobClientthat can be used to communicate with the submitted job, completed on submission succeeded. - Throws:
Exception- which occurs during job execution.
-
isCheckpointingEnabled
boolean isCheckpointingEnabled()Checks whether checkpointing is enabled.- Returns:
- True if checkpointing is enables, false otherwise.
-