public class DummyStreamExecutionEnvironment
extends org.apache.flink.streaming.api.environment.StreamExecutionEnvironment
StreamExecutionEnvironment, which holds a real StreamExecutionEnvironment, shares all configurations of the real environment, and disables all
configuration setting methods.
When translating relational plan to execution plan in the Planner, the generated
Transformations will be added into StreamExecutionEnvironment's buffer, and they will be
cleared only when StreamExecutionEnvironment.execute() method is called. Each TableEnvironment instance holds an immutable StreamExecutionEnvironment instance. If there are
multiple translations (not all for `execute`, e.g. `explain` and then `execute`) in one
TableEnvironment instance, the transformation buffer is dirty, and execution result may be
incorrect.
This dummy StreamExecutionEnvironment is only used for buffering the transformations generated in the planner. A new dummy StreamExecutionEnvironment instance should be created for each translation, and this could avoid dirty the transformation buffer of the real StreamExecutionEnvironment instance.
All set methods (e.g. `setXX`, `enableXX`, `disableXX`, etc) are disabled to prohibit changing configuration, all get methods (e.g. `getXX`, `isXX`, etc) will be delegated to the real StreamExecutionEnvironment. `execute`, `getStreamGraph`, `getExecutionPlan` methods are also disabled, while `addOperator` method is enabled to allow the planner to add the generated transformations to the dummy StreamExecutionEnvironment.
This class could be removed once the StreamTableSource interface and StreamTableSink interface are reworked.
NOTE: Please remove com.esotericsoftware.kryo item in the whitelist of
checkCodeDependencies() method in test_table_shaded_dependencies.sh end-to-end test when
this class is removed.
| 构造器和说明 |
|---|
DummyStreamExecutionEnvironment(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment realExecEnv) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addDefaultKryoSerializer(Class<?> type,
Class<? extends com.esotericsoftware.kryo.Serializer<?>> serializerClass) |
<T extends com.esotericsoftware.kryo.Serializer<?> & Serializable> |
addDefaultKryoSerializer(Class<?> type,
T serializer) |
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment |
disableOperatorChaining() |
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment |
enableCheckpointing() |
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment |
enableCheckpointing(long interval) |
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment |
enableCheckpointing(long interval,
org.apache.flink.streaming.api.CheckpointingMode mode) |
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment |
enableCheckpointing(long interval,
org.apache.flink.streaming.api.CheckpointingMode mode,
boolean force) |
org.apache.flink.api.common.JobExecutionResult |
execute() |
org.apache.flink.api.common.JobExecutionResult |
execute(org.apache.flink.streaming.api.graph.StreamGraph streamGraph) |
org.apache.flink.api.common.JobExecutionResult |
execute(String jobName) |
long |
getBufferTimeout() |
List<org.apache.flink.api.java.tuple.Tuple2<String,org.apache.flink.api.common.cache.DistributedCache.DistributedCacheEntry>> |
getCachedFiles() |
org.apache.flink.streaming.api.environment.CheckpointConfig |
getCheckpointConfig() |
org.apache.flink.streaming.api.CheckpointingMode |
getCheckpointingMode() |
long |
getCheckpointInterval() |
org.apache.flink.api.common.ExecutionConfig |
getConfig() |
org.apache.flink.configuration.ReadableConfig |
getConfiguration() |
String |
getExecutionPlan() |
int |
getMaxParallelism() |
int |
getNumberOfExecutionRetries() |
int |
getParallelism() |
org.apache.flink.api.common.restartstrategy.RestartStrategies.RestartStrategyConfiguration |
getRestartStrategy() |
org.apache.flink.runtime.state.StateBackend |
getStateBackend() |
org.apache.flink.streaming.api.graph.StreamGraph |
getStreamGraph() |
org.apache.flink.streaming.api.TimeCharacteristic |
getStreamTimeCharacteristic() |
boolean |
isChainingEnabled() |
boolean |
isForceCheckpointing() |
void |
registerCachedFile(String filePath,
String name) |
void |
registerCachedFile(String filePath,
String name,
boolean executable) |
void |
registerType(Class<?> type) |
void |
registerTypeWithKryoSerializer(Class<?> type,
Class<? extends com.esotericsoftware.kryo.Serializer> serializerClass) |
<T extends com.esotericsoftware.kryo.Serializer<?> & Serializable> |
registerTypeWithKryoSerializer(Class<?> type,
T serializer) |
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment |
setBufferTimeout(long timeoutMillis) |
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment |
setMaxParallelism(int maxParallelism) |
void |
setNumberOfExecutionRetries(int numberOfExecutionRetries) |
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment |
setParallelism(int parallelism) |
void |
setRestartStrategy(org.apache.flink.api.common.restartstrategy.RestartStrategies.RestartStrategyConfiguration restartStrategyConfiguration) |
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment |
setStateBackend(org.apache.flink.runtime.state.StateBackend backend) |
void |
setStreamTimeCharacteristic(org.apache.flink.streaming.api.TimeCharacteristic characteristic) |
addOperator, addSource, addSource, addSource, addSource, areExplicitEnvironmentsAllowed, clean, clearJobListeners, configure, configure, createInput, createInput, createLocalEnvironment, createLocalEnvironment, createLocalEnvironment, createLocalEnvironment, createLocalEnvironmentWithWebUI, createRemoteEnvironment, createRemoteEnvironment, createRemoteEnvironment, enableChangelogStateBackend, executeAsync, executeAsync, executeAsync, fromCollection, fromCollection, fromCollection, fromCollection, fromElements, fromElements, fromParallelCollection, fromParallelCollection, fromSequence, fromSource, fromSource, generateSequence, generateStreamGraph, getDefaultLocalParallelism, getDefaultSavepointDirectory, getExecutionEnvironment, getExecutionEnvironment, getJobListeners, getStreamGraph, getTransformations, getUserClassloader, initializeContextEnvironment, isChangelogStateBackendEnabled, isForceUnalignedCheckpoints, isUnalignedCheckpointsEnabled, readFile, readFile, readFile, readFile, readFileStream, readTextFile, readTextFile, registerJobListener, registerSlotSharingGroup, resetContextEnvironment, setDefaultLocalParallelism, setDefaultSavepointDirectory, setDefaultSavepointDirectory, setDefaultSavepointDirectory, setRuntimeMode, socketTextStream, socketTextStream, socketTextStream, socketTextStream, socketTextStreampublic DummyStreamExecutionEnvironment(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment realExecEnv)
public org.apache.flink.api.common.ExecutionConfig getConfig()
getConfig 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.configuration.ReadableConfig getConfiguration()
getConfiguration 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic List<org.apache.flink.api.java.tuple.Tuple2<String,org.apache.flink.api.common.cache.DistributedCache.DistributedCacheEntry>> getCachedFiles()
getCachedFiles 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.streaming.api.environment.StreamExecutionEnvironment setParallelism(int parallelism)
setParallelism 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.streaming.api.environment.StreamExecutionEnvironment setMaxParallelism(int maxParallelism)
setMaxParallelism 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic int getParallelism()
getParallelism 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic int getMaxParallelism()
getMaxParallelism 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.streaming.api.environment.StreamExecutionEnvironment setBufferTimeout(long timeoutMillis)
setBufferTimeout 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic long getBufferTimeout()
getBufferTimeout 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.streaming.api.environment.StreamExecutionEnvironment disableOperatorChaining()
disableOperatorChaining 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic boolean isChainingEnabled()
isChainingEnabled 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.streaming.api.environment.CheckpointConfig getCheckpointConfig()
getCheckpointConfig 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.streaming.api.environment.StreamExecutionEnvironment enableCheckpointing(long interval)
enableCheckpointing 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.streaming.api.environment.StreamExecutionEnvironment enableCheckpointing(long interval,
org.apache.flink.streaming.api.CheckpointingMode mode)
enableCheckpointing 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.streaming.api.environment.StreamExecutionEnvironment enableCheckpointing(long interval,
org.apache.flink.streaming.api.CheckpointingMode mode,
boolean force)
enableCheckpointing 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.streaming.api.environment.StreamExecutionEnvironment enableCheckpointing()
enableCheckpointing 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic long getCheckpointInterval()
getCheckpointInterval 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic boolean isForceCheckpointing()
isForceCheckpointing 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.streaming.api.CheckpointingMode getCheckpointingMode()
getCheckpointingMode 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.streaming.api.environment.StreamExecutionEnvironment setStateBackend(org.apache.flink.runtime.state.StateBackend backend)
setStateBackend 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.runtime.state.StateBackend getStateBackend()
getStateBackend 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic void setRestartStrategy(org.apache.flink.api.common.restartstrategy.RestartStrategies.RestartStrategyConfiguration restartStrategyConfiguration)
setRestartStrategy 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.api.common.restartstrategy.RestartStrategies.RestartStrategyConfiguration getRestartStrategy()
getRestartStrategy 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic void setNumberOfExecutionRetries(int numberOfExecutionRetries)
setNumberOfExecutionRetries 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic int getNumberOfExecutionRetries()
getNumberOfExecutionRetries 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic <T extends com.esotericsoftware.kryo.Serializer<?> & Serializable> void addDefaultKryoSerializer(Class<?> type, T serializer)
addDefaultKryoSerializer 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic void addDefaultKryoSerializer(Class<?> type, Class<? extends com.esotericsoftware.kryo.Serializer<?>> serializerClass)
addDefaultKryoSerializer 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic <T extends com.esotericsoftware.kryo.Serializer<?> & Serializable> void registerTypeWithKryoSerializer(Class<?> type, T serializer)
registerTypeWithKryoSerializer 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic void registerTypeWithKryoSerializer(Class<?> type, Class<? extends com.esotericsoftware.kryo.Serializer> serializerClass)
registerTypeWithKryoSerializer 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic void registerType(Class<?> type)
registerType 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic void setStreamTimeCharacteristic(org.apache.flink.streaming.api.TimeCharacteristic characteristic)
setStreamTimeCharacteristic 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.streaming.api.TimeCharacteristic getStreamTimeCharacteristic()
getStreamTimeCharacteristic 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.api.common.JobExecutionResult execute()
throws Exception
execute 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentExceptionpublic org.apache.flink.api.common.JobExecutionResult execute(String jobName) throws Exception
execute 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentExceptionpublic org.apache.flink.api.common.JobExecutionResult execute(org.apache.flink.streaming.api.graph.StreamGraph streamGraph)
throws Exception
execute 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentExceptionpublic void registerCachedFile(String filePath, String name)
registerCachedFile 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic void registerCachedFile(String filePath, String name, boolean executable)
registerCachedFile 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic org.apache.flink.streaming.api.graph.StreamGraph getStreamGraph()
getStreamGraph 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentpublic String getExecutionPlan()
getExecutionPlan 在类中 org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.