二、问题
1、No operators defined in streaming topology. Cannot generate StreamGraph.
代码结构
val streamEnv: StreamExecutionEnvironment = StreamExecutionEnvironment.getExecutionEnvironment
val settings: EnvironmentSettings = EnvironmentSettings.newInstance().useOldPlanner().inStreamingMode().build()
val tableEnv: StreamTableEnvironment = StreamTableEnvironment.create(streamEnv, settings)
......
tableEnv.execute("group")
Flink1.11 版本对于两个env的execute代码实现有改动,在1.11后的版本里需要用
streamEnv.execute("group")
2、No ExecutorFactory found to execute the application
经查,原因是:从Flink1.11开始,移除了flink-streaming-java对flink-clients的依赖,需要手动加入clients依赖。
|