You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/06/28 07:28:47 UTC

[GitHub] [flink] GJL commented on a change in pull request #8922: [FLINK-12876][runtime] Add an adapter of region failover NG for legacy scheduler

GJL commented on a change in pull request #8922: [FLINK-12876][runtime] Add an adapter of region failover NG for legacy scheduler
URL: https://github.com/apache/flink/pull/8922#discussion_r298481721
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
 ##########
 @@ -939,123 +933,22 @@ public void scheduleForExecution() throws JobException {
 		}
 	}
 
-	private CompletableFuture<Void> scheduleLazy(SlotProvider slotProvider) {
-
-		final ArrayList<CompletableFuture<Void>> schedulingFutures = new ArrayList<>(numVerticesTotal);
-		// simply take the vertices without inputs.
-		for (ExecutionJobVertex ejv : verticesInCreationOrder) {
-			if (ejv.getJobVertex().isInputVertex()) {
-				final CompletableFuture<Void> schedulingJobVertexFuture = ejv.scheduleAll(
-					slotProvider,
-					allowQueuedScheduling,
-					LocationPreferenceConstraint.ALL, // since it is an input vertex, the input based location preferences should be empty
-					Collections.emptySet());
-
-				schedulingFutures.add(schedulingJobVertexFuture);
-			}
-		}
-
-		return FutureUtils.waitForAll(schedulingFutures);
+	private CompletableFuture<Void> scheduleLazy() {
+		final List<ExecutionVertex> executionVertices = StreamSupport
+			.stream(getAllExecutionVertices().spliterator(), false)
+			.collect(Collectors.toList());
+		return SchedulingUtils.scheduleLazy(executionVertices, this);
 
 Review comment:
   `SchedulingUtils` could accept `Iterable`

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services