zhuzhurk commented on code in PR #20039: URL: https://github.com/apache/flink/pull/20039#discussion_r905685825
########## flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SlotSharingExecutionSlotAllocator.java: ########## @@ -94,6 +96,34 @@ class SlotSharingExecutionSlotAllocator implements ExecutionSlotAllocator { this.sharedSlots = new IdentityHashMap<>(); } + @Override + public List<ExecutionSlotAssignment> allocateSlotsFor( + List<ExecutionAttemptID> executionAttemptIds) { + + final Map<ExecutionVertexID, ExecutionAttemptID> vertexIdToExecutionId = new HashMap<>(); + executionAttemptIds.forEach( + executionId -> + vertexIdToExecutionId.put(executionId.getExecutionVertexId(), executionId)); + + checkState( + vertexIdToExecutionId.size() == executionAttemptIds.size(), + "SlotSharingExecutionSlotAllocator does not support one execution vertex to have multiple concurrent executions"); + + final List<ExecutionVertexID> vertexIds = Review Comment: We cannot do this because we need to respect the given order. -- 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