Thesharing commented on a change in pull request #16687:
URL: https://github.com/apache/flink/pull/16687#discussion_r688226620
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/LocalInputPreferredSlotSharingStrategy.java
##########
@@ -214,87 +245,87 @@ private ExecutionSlotSharingGroup
tryFindAvailableProducerExecutionSlotSharingGr
final ExecutionVertexID executionVertexId =
executionVertex.getId();
- for (SchedulingResultPartition partition :
executionVertex.getConsumedResults()) {
- final ExecutionVertexID producerVertexId =
partition.getProducer().getId();
- if (!inSameLogicalSlotSharingGroup(producerVertexId,
executionVertexId)) {
- continue;
- }
-
- final ExecutionSlotSharingGroup producerGroup =
- executionSlotSharingGroupMap.get(producerVertexId);
-
- checkState(producerGroup != null);
- if (isGroupAvailableForVertex(producerGroup,
executionVertexId)) {
- return producerGroup;
+ for (ConsumedPartitionGroup consumedPartitionGroup :
+ executionVertex.getConsumedPartitionGroups()) {
+
+ Iterator<ExecutionSlotSharingGroup> availableGroupIterator =
+ getAvailableGroupsForConsumedPartitionGroup(
Review comment:
Yes. It seems confusing. I've tried to rewrite these usages.
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/LocalInputPreferredSlotSharingStrategy.java
##########
@@ -159,6 +184,12 @@ private ExecutionSlotSharingGroupBuilder(
return executionSlotSharingGroupMap;
}
+ /**
+ * The vertices are ordered since {@link
+ *
org.apache.flink.runtime.scheduler.adapter.DefaultExecutionTopology#getVertices}
are
+ * ordered, i.e., {@link
DefaultExecutionGraph#getAllExecutionVertices} are topologically
Review comment:
Resolved.
--
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]