Flink程序运行的时候设置Batch模式报错,提示:please set the 'execution.runtime-mode' to STREAMING or AUTOMATIC

提问者:帅平 问题分类:大数据
运行一个Flink DataStream job的时候,设置了:
-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啊?
1 个回答
满意答案
人潮似水看见我°
人潮似水看见我°
答案被隐藏
查看该答案需要支付 2 积分
登录账号
发布于:10个月前 (08-15) IP属地:四川省
我来回答