Environment

Flink Environment

关系

Flink-Environment

获取方式

import org.apache.flink.api.java.ExecutionEnvironment;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.table.api.bridge.java.BatchTableEnvironment;
import org.apache.flink.table.api.bridge.java.StreamTableEnvironment;

// DataSet
ExecutionEnvironment bEnv = ExecutionEnvironment.getExecutionEnvironment();
// DataSet Table
BatchTableEnvironment btEnv = BatchTableEnvironment.create(bEnv);

// DataStream
StreamExecutionEnvironment sEnv = StreamExecutionEnvironment.getExecutionEnvironment();
// DataStream Table
StreamTableEnvironment stEnv = StreamTableEnvironment.create(sEnv);

Read More