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


##########
seatunnel-engine/seatunnel-engine-client/src/main/java/org/apache/seatunnel/engine/client/job/JobProxy.java:
##########
@@ -47,10 +51,37 @@ public long getJobId() {
 
     @Override
     public void submitJob() throws ExecutionException, InterruptedException {
-        ClientMessage request = SeaTunnelSubmitJobCodec.encodeRequest(
+        ClientMessage request = 
SeaTunnelSubmitJobCodec.encodeRequest(jobImmutableInformation.getJobId(),
             
seaTunnelHazelcastClient.getSerializationService().toData(jobImmutableInformation));
-        NonCompletableFuture<Void> submitJobFuture =
+        PassiveCompletableFuture<Void> submitJobFuture =
             
seaTunnelHazelcastClient.requestOnMasterAndGetCompletableFuture(request);
         submitJobFuture.get();
     }
+
+    @Override
+    public void waitForJobComplete() {
+        PassiveCompletableFuture<JobStatus> jobFuture =
+            seaTunnelHazelcastClient.requestOnMasterAndGetCompletableFuture(
+                
SeaTunnelWaitForJobCompleteCodec.encodeRequest(jobImmutableInformation.getJobId()),
+                response -> {
+                    return 
JobStatus.values()[SeaTunnelWaitForJobCompleteCodec.decodeResponse(response)];
+                });
+
+        jobFuture.whenComplete((v, t) -> {

Review Comment:
   Yes, I will do it in next feature.



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