Tartarus0zm commented on code in PR #20223:
URL: https://github.com/apache/flink/pull/20223#discussion_r918502121
##########
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);
+ break;
+ case CANCELED:
+ hook.onCanceled(jobID);
+ break;
+ case FAILED:
+ hook.onFailed(jobID, cause);
+ break;
+ case FINISHED:
+ hook.onFinished(jobID);
+ break;
+ }
+ } catch (Throwable ignore) {
+ LOG.warn("Error while notifying JobStatusHook[{}]",
hook.getClass(), ignore);
Review Comment:
good catch
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]