Flink程序运行的时候设置Batch模式报错,提示:please set the 'execution.runtime-mode' to STREAMING or AUTOMATIC
运行一个Flink DataStream job的时候,设置了:
然后报错了,提示:
这是为什么不能设置为batch啊?
-Dexecution.runtime-mode=BATCH
然后报错了,提示:
Exception in thread "main" java.lang.IllegalStateException: Detected an UNBOUNDED source with the 'execution.runtime-mode' set to 'BATCH'. This combination is not allowed, please set the 'execution.runtime-mode' to STREAMING or AUTOMATIC
at org.apache.flink.util.Preconditions.checkState(Preconditions.java:193)
at org.apache.flink.streaming.api.graph.StreamGraphGenerator.shouldExecuteInBatchMode(StreamGraphGenerator.java:489)
at org.apache.flink.streaming.api.graph.StreamGraphGenerator.generate(StreamGraphGenerator.java:313)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.getStreamGraph(StreamExecutionEnvironment.java:2248)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.getStreamGraph(StreamExecutionEnvironment.java:2239)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.getStreamGraph(StreamExecutionEnvironment.java:2225)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:2052)
at org.example.datastream.WordCount.main(WordCount.java:23)
这是为什么不能设置为batch啊?
发布于:2年前 (2023-08-15) IP属地:四川省
1 个回答
我来回答
您需要 登录 后回答此问题!