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_r351146336
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/strategy/EagerSchedulingStrategy.java
 ##########
 @@ -72,27 +69,24 @@ public void onPartitionConsumable(ExecutionVertexID 
executionVertexId, ResultPar
                // Will not react to these notifications.
        }
 
-       private void allocateSlotsAndDeploy(final Set<ExecutionVertexID> 
verticesToDeploy) {
+       private void allocateSlotsAndDeploy(final List<ExecutionVertexID> 
verticesToDeploy) {
                final List<ExecutionVertexDeploymentOption> 
executionVertexDeploymentOptions =
                                
createExecutionVertexDeploymentOptions(verticesToDeploy);
                
schedulerOperations.allocateSlotsAndDeploy(executionVertexDeploymentOptions);
        }
 
-       private Set<ExecutionVertexID> getAllVerticesFromTopology() {
-               return StreamSupport
-                               
.stream(schedulingTopology.getVertices().spliterator(), false)
+       private List<ExecutionVertexID> getAllVerticesFromTopology() {
+               return IterableUtils.toStream(schedulingTopology.getVertices())
                                .map(SchedulingExecutionVertex::getId)
-                               .collect(Collectors.toSet());
+                               .collect(Collectors.toList());
        }
 
        private List<ExecutionVertexDeploymentOption> 
createExecutionVertexDeploymentOptions(
-                       final Collection<ExecutionVertexID> vertices) {
-               List<ExecutionVertexDeploymentOption> 
executionVertexDeploymentOptions = new ArrayList<>(vertices.size());
-               for (ExecutionVertexID executionVertexID : vertices) {
-                       executionVertexDeploymentOptions.add(
-                                       new 
ExecutionVertexDeploymentOption(executionVertexID, deploymentOption));
-               }
-               return executionVertexDeploymentOptions;
+                       final List<ExecutionVertexID> vertices) {
+
+               return vertices.stream()
 
 Review comment:
   yes. It is dropped.

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