XComp commented on a change in pull request #15262:
URL: https://github.com/apache/flink/pull/15262#discussion_r597583464
##########
File path:
flink-clients/src/test/java/org/apache/flink/client/program/PerJobMiniClusterFactoryTest.java
##########
@@ -190,6 +190,7 @@ private static JobGraph getNoopJobGraph() {
private static JobGraph getCancellableJobGraph() {
JobVertex jobVertex = new JobVertex("jobVertex");
jobVertex.setInvokableClass(MyCancellableInvokable.class);
+ jobVertex.setParallelism(1);
Review comment:
You're right. There are numerous tests that are affected by this. I took
another look into `JobGraphBuilder`. @rmetzger is it save to assume that a
`Streaming` job is not allowed to have the parallelism set to `-1`?
In general, there seem to be some ongoing refactorings with the
`JobGraphBuilder`? The only time it is used in production is for [creating a
Batch
JobGraph](https://github.com/apache/flink/blob/e000723fba5ff76d5c837e49d16c570dc55c274a/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobGraphBuilder.java#L142).
The streaming jobs seem to rely on `StreamGraphGenerator` which does not
utilize the `JobGraphBuilder`.
It feels like `StreamGraphGenerator` would be the most appropriate location
to set the parallelism if we say that this is a general requirement for
Streaming `JobGraph`s. But that would leave us with the problem that it's not
implemented in the `JobBuilder` and requires us to adapt quite a few tests
accordingly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]