rkhachatryan commented on code in PR #21981:
URL: https://github.com/apache/flink/pull/21981#discussion_r1120003300


##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/allocator/SlotAllocator.java:
##########
@@ -54,14 +58,35 @@ public interface SlotAllocator {
     Optional<? extends VertexParallelism> determineParallelism(
             JobInformation jobInformation, Collection<? extends SlotInfo> 
slots);
 
+    /**
+     * Same as {@link #determineParallelism(JobInformation, Collection)} but 
additionally determine
+     * assignment of slots to execution slot sharing groups.
+     */
+    default Optional<JobSchedulingPlan> 
determineParallelismAndCalculateAssignment(
+            JobInformation jobInformation,
+            Collection<? extends SlotInfo> slots,
+            @Nullable ExecutionGraph previousExecutionGraph) {
+        return determineParallelismAndCalculateAssignment(
+                jobInformation,
+                slots,
+                JobAllocationsInformation.fromGraph(
+                        previousExecutionGraph,
+                        StateSizeEstimates.fromGraph(previousExecutionGraph)));
+    }

Review Comment:
   Right, mocking was the reason why I introduced the 2nd method. 
   I agree, now with `JobAllocationsInformation` that method can be directly 
called from the scheduler. 
   I'll remove this method with `ExecutionGraph`.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to