zhuzhurk commented on code in PR #23165:
URL: https://github.com/apache/flink/pull/23165#discussion_r1288013689


##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SimpleExecutionSlotAllocator.java:
##########
@@ -74,9 +74,10 @@ public class SimpleExecutionSlotAllocator implements 
ExecutionSlotAllocator {
     }
 
     @Override
-    public List<ExecutionSlotAssignment> allocateSlotsFor(
+    public Map<ExecutionAttemptID, ExecutionSlotAssignment> allocateSlotsFor(
             List<ExecutionAttemptID> executionAttemptIds) {
-        List<ExecutionSlotAssignment> result = new 
ArrayList<>(executionAttemptIds.size());
+        Map<ExecutionAttemptID, ExecutionSlotAssignment> result =
+                new HashMap<>(executionAttemptIds.size());

Review Comment:
   Setting initial capacity for maps should be avoided, because it usually does 
not help.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to