zhangshenghang commented on code in PR #10133:
URL: https://github.com/apache/seatunnel/pull/10133#discussion_r2643250310
##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/dag/physical/PhysicalPlan.java:
##########
@@ -274,6 +278,18 @@ public synchronized void updateJobState(@NonNull JobStatus
targetState) {
log.info(
String.format(
"%s turned from state %s to %s.", jobFullName,
current, targetState));
+ if (!targetState.isEndState()
+ && this.engineConfig != null
+ && this.engineConfig.isReportNonTerminalJobState()) {
+ jobMaster
+ .getCoordinatorService()
+ .getEventProcessor()
+ .process(
+ new JobStateEvent(
+ jobImmutableInformation.getJobId(),
+
jobImmutableInformation.getJobConfig().getName(),
+ targetState));
+ }
Review Comment:
If any exception occurs here, it will cause the program to stop abnormally.
I'm not sure if all `EventHandler.handle` will not throw exceptions; we should
reduce the risk of exceptions here.
--
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]