zhuzhurk commented on a change in pull request #10309: [FLINK-14909][runtime]
Let tasks get scheduled in topological order when possible
URL: https://github.com/apache/flink/pull/10309#discussion_r351147593
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/strategy/LazyFromSourcesSchedulingStrategy.java
##########
@@ -100,12 +101,15 @@ public void onExecutionStateChange(ExecutionVertexID
executionVertexId, Executio
return;
}
- final Set<SchedulingExecutionVertex<?, ?>> verticesToSchedule =
IterableUtils
+ final Set<SchedulingExecutionVertex<?, ?>> verticesDeduplicator
= new HashSet<>();
+
+ final List<SchedulingExecutionVertex<?, ?>> verticesToSchedule
= IterableUtils
.toStream(schedulingTopology.getVertexOrThrow(executionVertexId).getProducedResults())
.filter(partition ->
partition.getResultType().isBlocking())
.flatMap(partition ->
inputConstraintChecker.markSchedulingResultPartitionFinished(partition).stream())
.flatMap(partition ->
IterableUtils.toStream(partition.getConsumers()))
- .collect(Collectors.toSet());
+ .filter(verticesDeduplicator::add)
Review comment:
Good suggestion. It can be useful in the future.
----------------------------------------------------------------
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]
With regards,
Apache Git Services