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 2022/07/12 02:53:24 UTC

[GitHub] [flink] Tartarus0zm commented on a diff in pull request #20223: [FLINK-28457][runtime] Introduce JobStatusHook

Tartarus0zm commented on code in PR #20223:
URL: https://github.com/apache/flink/pull/20223#discussion_r918501911


##########
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/DefaultExecutionGraph.java:
##########
@@ -1544,6 +1552,30 @@ private void notifyJobStatusChange(JobStatus newState) {
         }
     }
 
+    private void notifyJobStatusHooks(JobStatus newState, Throwable cause) {
+        JobID jobID = jobInformation.getJobId();
+        for (JobStatusHook hook : jobStatusHooks) {
+            try {
+                switch (newState) {
+                    case CREATED:
+                        hook.onCreated(jobID);

Review Comment:
   This is not necessary, only the FAILED branch needs to use cause



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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org