flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] GJL commented on a change in pull request #8318: [FLINK-12231][runtime] Introduce Scheduler interface and adapt ExecutionGraph to it
Date Sun, 05 May 2019 19:39:04 GMT
GJL commented on a change in pull request #8318: [FLINK-12231][runtime] Introduce Scheduler
interface and adapt ExecutionGraph to it
URL: https://github.com/apache/flink/pull/8318#discussion_r281035777
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java
 ##########
 @@ -1006,101 +760,58 @@ private Acknowledge suspendExecution(final Exception cause) {
 		return Acknowledge.get();
 	}
 
-	private void assignExecutionGraph(
-			ExecutionGraph newExecutionGraph,
+	private void assignScheduler(
+			SchedulerNG newScheduler,
 			JobManagerJobMetricGroup newJobManagerJobMetricGroup) {
 		validateRunsInMainThread();
-		checkState(executionGraph.getState().isTerminalState());
+		checkState(schedulerNG.requestJobStatus().isTerminalState());
 		checkState(jobManagerJobMetricGroup == null);
 
-		executionGraph = newExecutionGraph;
+		schedulerNG = newScheduler;
 		jobManagerJobMetricGroup = newJobManagerJobMetricGroup;
 	}
 
-	private void resetAndScheduleExecutionGraph() throws Exception {
+	private void resetAndStartScheduler() throws Exception {
 		validateRunsInMainThread();
 
-		final CompletableFuture<Void> executionGraphAssignedFuture;
+		final CompletableFuture<Void> schedulerAssignedFuture;
 
-		if (executionGraph.getState() == JobStatus.CREATED) {
-			executionGraphAssignedFuture = CompletableFuture.completedFuture(null);
-			executionGraph.start(getMainThreadExecutor());
+		if (schedulerNG.requestJobStatus() == JobStatus.CREATED) {
 
 Review comment:
   I guess it's ok not to protect `requestJobStatus()` against invocations from outside the
main thread for now.

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

Mime
View raw message