GJL 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_r350738770
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultScheduler.java
 ##########
 @@ -152,6 +156,11 @@ public DefaultScheduler(
                        restartBackoffTimeStrategy);
                this.schedulingStrategy = 
schedulingStrategyFactory.createInstance(this, getSchedulingTopology());
                this.executionSlotAllocator = 
checkNotNull(executionSlotAllocatorFactory).createInstance(getInputsLocationsRetriever());
+
+               this.executionVertexIDComparator = new 
ExecutionVertexIDComparator(
 
 Review comment:
   I'd extract a method here:
   
   ```
        this.executionVertexIDComparator = new 
ExecutionVertexIDComparator(getSortedJobVertices());
        ...
   
        private static List<JobVertexID> getSortedJobVertices(final JobGraph 
jobgraph) {
                return jobGraph
                        .getVerticesSortedTopologicallyFromSources()
                        .stream()
                        .map(JobVertex::getID)
                        .collect(Collectors.toList());
        }
   ```

----------------------------------------------------------------
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

Reply via email to