EricJoy2048 commented on code in PR #2413:
URL: 
https://github.com/apache/incubator-seatunnel/pull/2413#discussion_r949775983


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java:
##########
@@ -116,23 +122,39 @@ public LiveOperationRegistry getLiveOperationRegistry() {
     /**
      * call by client to submit job
      */
-    @SuppressWarnings("checkstyle:MagicNumber")
-    public NonCompletableFuture<Void> submitJob(Data jobImmutableInformation) {
+    public PassiveCompletableFuture<Void> submitJob(long jobId, Data 
jobImmutableInformation) {
         CompletableFuture<Void> voidCompletableFuture = new 
CompletableFuture<>();
         JobMaster jobMaster = new JobMaster(jobImmutableInformation, 
this.nodeEngine, executorService);
         executorService.submit(() -> {
             try {
                 jobMaster.init();
-                jobMaster.run();
+                runningJobMasterMap.put(jobId, jobMaster);
             } catch (Throwable e) {
-                LOGGER.severe("submit job error: " + e.getMessage());
+                LOGGER.severe(String.format("submit job %s error %s ", jobId, 
ExceptionUtils.getMessage(e)));
                 voidCompletableFuture.completeExceptionally(e);
             } finally {
                 // We specify that when init is complete, the submitJob is 
complete
                 voidCompletableFuture.complete(null);
             }
-            //jobMaster.run();
+
+            try {
+                jobMaster.run();

Review Comment:
   `submitJob` method only return the `submit` operation state, If 
`jobMaster.run()` throw Exception, if will be handle in `waitForJobComplete()`



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