Thesharing commented on a change in pull request #16687:
URL: https://github.com/apache/flink/pull/16687#discussion_r688227194
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/LocalInputPreferredSlotSharingStrategy.java
##########
@@ -94,12 +98,34 @@ public LocalInputPreferredSlotSharingStrategy create(
private final Map<ExecutionVertexID, ExecutionSlotSharingGroup>
executionSlotSharingGroupMap;
- final Map<CoLocationConstraint, ExecutionSlotSharingGroup>
+ private final Map<CoLocationConstraint, ExecutionSlotSharingGroup>
constraintToExecutionSlotSharingGroupMap;
- final Map<SlotSharingGroupId, List<ExecutionSlotSharingGroup>>
executionSlotSharingGroups;
+ private final Map<SlotSharingGroupId, List<ExecutionSlotSharingGroup>>
+ executionSlotSharingGroups;
- private final Map<ExecutionSlotSharingGroup, Set<JobVertexID>>
assignedJobVerticesForGroups;
+ /**
+ * A JobVertex only belongs to a {@link SlotSharingGroup}. A
SlotSharingGroup is
+ * corresponding to a set of {@link ExecutionSlotSharingGroup}s. We
can maintain available
+ * ExecutionSlotSharingGroups for each JobVertex.
+ *
+ * <p>Once an ExecutionSlotSharingGroup is created, it becomes
available for all JobVertices
+ * in the corresponding SlotSharingGroup in the beginning.
+ *
+ * <p>Once a SchedulingExecutionVertex is added to the
ExecutionSlotSharingGroup, the group
+ * is no longer available for other SchedulingExecutionVertices
corresponding to the same
+ * JobVertex.
+ */
+ private final Map<JobVertexID, Set<ExecutionSlotSharingGroup>>
availableGroupsForJobVertex;
+
+ /**
+ * Maintains the available {@link ExecutionSlotSharingGroup}s for
every {@link
+ * ConsumedPartitionGroup}. The available groups are computed in {@link
+ * this#computeAllAvailableGroupsForConsumedPartitionGroup} when the
ConsumedPartitionGroup
+ * is traversed for the first time.
+ */
+ private final Map<ConsumedPartitionGroup,
Set<ExecutionSlotSharingGroup>>
+ availableProducerGroupsForConsumedPartitionGroup;
Review comment:
I've tried to improve the doc.
--
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]