GJL commented on a change in pull request #9663: [WIP][FLINK-12433][runtime] 
Implement DefaultScheduler stub
URL: https://github.com/apache/flink/pull/9663#discussion_r327104617
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
 ##########
 @@ -1485,6 +1525,20 @@ else if (!isRestartable && 
transitionState(currentState, JobStatus.FAILED, failu
                }
        }
 
+       public void failJob(Throwable cause) {
+               if (state == JobStatus.FAILING || 
state.isGloballyTerminalState()) {
+                       return;
+               }
+
+               transitionState(JobStatus.FAILING);
+               initFailureCause(cause);
+
+               cancelVerticesAsync().whenComplete((aVoid, throwable) -> {
+                       transitionState(JobStatus.FAILED);
 
 Review comment:
   I originally meant that your proposal is better/makes sense. I was talking 
about line 1533 where we transition to `FAILING`. Do you think we should log 
the exception there as well?

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