zhuzhurk commented on a change in pull request #12256:
URL: https://github.com/apache/flink/pull/12256#discussion_r438859474
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultExecutionSlotAllocator.java
##########
@@ -77,22 +75,20 @@ public DefaultExecutionSlotAllocator(
LOG.debug("Allocate slot with id {} for execution {}",
slotRequestId, executionVertexId);
- CompletableFuture<LogicalSlot> slotFuture =
calculatePreferredLocations(
- executionVertexId,
- Collections.emptySet()).thenCompose(
-
(Collection<TaskManagerLocation> preferredLocations) ->
-
slotProviderStrategy.allocateSlot(
-
slotRequestId,
- new
ScheduledUnit(
-
executionVertexId,
-
slotSharingGroupId,
-
schedulingRequirements.getCoLocationConstraint()),
-
SlotProfile.priorAllocation(
-
schedulingRequirements.getTaskResourceProfile(),
-
schedulingRequirements.getPhysicalSlotResourceProfile(),
-
preferredLocations,
-
Collections.singletonList(schedulingRequirements.getPreviousAllocationId()),
-
allPreviousAllocationIds)));
+ final CompletableFuture<SlotProfile> slotProfileFuture
= getSlotProfileFuture(
+ schedulingRequirements,
+
schedulingRequirements.getPhysicalSlotResourceProfile(),
+ Collections.emptySet(),
+ allPreviousAllocationIds);
+
+ final CompletableFuture<LogicalSlot> slotFuture =
slotProfileFuture.thenCompose(
+ slotProfile ->
slotProviderStrategy.allocateSlot(
+ slotRequestId,
+ new ScheduledUnit(
+ executionVertexId,
+ slotSharingGroupId,
+
schedulingRequirements.getCoLocationConstraint()),
+ slotProfile));
Review comment:
Yes it's good to have. done.
----------------------------------------------------------------
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]