austince commented on a change in pull request #15348:
URL: https://github.com/apache/flink/pull/15348#discussion_r602555236



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/AdaptiveScheduler.java
##########
@@ -270,6 +276,42 @@ private static void assertPreconditions(JobGraph jobGraph) 
throws RuntimeExcepti
         }
     }
 
+    @VisibleForTesting
+    static VertexParallelismStore 
computeVertexParallelismStore(Iterable<JobVertex> vertices) {
+        DefaultVertexParallelismStore store = new 
DefaultVertexParallelismStore();
+
+        for (JobVertex vertex : vertices) {
+            // if no max parallelism was configured by the user, we calculate 
and set a default
+            final int maxParallelism =
+                    vertex.getMaxParallelism() == 
JobVertex.MAX_PARALLELISM_DEFAULT
+                            ? 
KeyGroupRangeAssignment.computeDefaultMaxParallelism(
+                                    vertex.getParallelism())
+                            : vertex.getMaxParallelism();
+
+            VertexParallelismInformation parallelismInfo =
+                    new DefaultVertexParallelismInfo(
+                            maxParallelism,

Review comment:
       Easy to incorporate now that parallelism setting is handled in the 
scheduler 👍🏼 




-- 
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:
us...@infra.apache.org


Reply via email to