TaoZex commented on code in PR #5114:
URL: https://github.com/apache/seatunnel/pull/5114#discussion_r1267480287


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/CoordinatorService.java:
##########
@@ -495,10 +495,11 @@ public PassiveCompletableFuture<Void> savePoint(long 
jobId) {
     public PassiveCompletableFuture<JobResult> waitForJobComplete(long jobId) {
         JobMaster runningJobMaster = runningJobMasterMap.get(jobId);
         if (runningJobMaster == null) {
-            JobStatus jobStatus = 
jobHistoryService.getJobDetailState(jobId).getJobStatus();
+            JobHistoryService.JobState jobState = 
jobHistoryService.getJobDetailState(jobId);
             CompletableFuture<JobResult> future = new CompletableFuture<>();
-            // TODO support history service record job execute error
-            future.complete(new JobResult(jobStatus, null));
+            if (jobState == null) future.complete(new 
JobResult(JobStatus.FAILED, null));

Review Comment:
   How about changing null (after JobStatus.FAILED) to alert that the job 
failed?



##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/CoordinatorService.java:
##########
@@ -495,10 +495,11 @@ public PassiveCompletableFuture<Void> savePoint(long 
jobId) {
     public PassiveCompletableFuture<JobResult> waitForJobComplete(long jobId) {
         JobMaster runningJobMaster = runningJobMasterMap.get(jobId);
         if (runningJobMaster == null) {
-            JobStatus jobStatus = 
jobHistoryService.getJobDetailState(jobId).getJobStatus();
+            JobHistoryService.JobState jobState = 
jobHistoryService.getJobDetailState(jobId);
             CompletableFuture<JobResult> future = new CompletableFuture<>();
-            // TODO support history service record job execute error
-            future.complete(new JobResult(jobStatus, null));
+            if (jobState == null) future.complete(new 
JobResult(JobStatus.FAILED, null));

Review Comment:
   How about changing null (after JobStatus.FAILED) to alert that the job 
failed?



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

Reply via email to