[ https://issues.apache.org/jira/browse/FLINK-8712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17631003#comment-17631003 ]
Weijie Guo commented on FLINK-8712: ----------------------------------- [~huwh] In my opinion, JobGraph#getMaximumParallelism has clear meaning and correct behavior, and the logic may not need to be changed. My main concern is that you plan to introduce getRequiredSlotNumber in JobGraph. From the name, this method should be able to correctly calculate the number of slots required for this graph. But as [~xtsong] pointed out, for batch jobs, the algorithm you give cannot achieve this goal. What's more, for batch jobs, even if I have only one slot, it should work. If you just want to make the MiniCluster smarter, you may be able to apply these magic to its interior without affecting the behavior of the JobGraph. Even so, I still want to know whether we really need to make MiniCluster smart. Maybe setting resources is what users should do. > Cannot execute job with multiple slot sharing groups on LocalExecutor > --------------------------------------------------------------------- > > Key: FLINK-8712 > URL: https://issues.apache.org/jira/browse/FLINK-8712 > Project: Flink > Issue Type: Bug > Components: Runtime / Task > Affects Versions: 1.5.0 > Reporter: Till Rohrmann > Priority: Not a Priority > Labels: auto-deprioritized-critical, auto-deprioritized-major, > auto-deprioritized-minor > > Currently, it is not possible to run a job with multiple slot sharing groups > on the LocalExecutor. The problem is that we determine the number of required > slots simply by looking for the max parallelism of the job but do not > consider slot sharing groups. > > {code:java} > // set up the streaming execution environment > final StreamExecutionEnvironment env = > StreamExecutionEnvironment.getExecutionEnvironment(); > env.setParallelism(1); > final DataStreamSource<Integer> input = env.addSource(new InfinitySource()); > final SingleOutputStreamOperator<Integer> different = input.map(new > MapFunction<Integer, Integer>() { > @Override > public Integer map(Integer integer) throws Exception { > return integer; > } > }).slotSharingGroup("Different"); > different.print(); > // execute program > env.execute("Flink Streaming Java API Skeleton");{code} -- This message was sent by Atlassian Jira (v8.20.10#820010)