Hisoka-X commented on code in PR #5702:
URL: https://github.com/apache/seatunnel/pull/5702#discussion_r1372531906


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestHttpPostCommandProcessor.java:
##########
@@ -96,14 +98,20 @@ private void handleSubmitJob(HttpPostCommand 
httpPostCommand, String uri)
         Config config = RestUtil.buildConfig(requestHandle(httpPostCommand));
         JobConfig jobConfig = new JobConfig();
         jobConfig.setName(requestParams.get(RestConstant.JOB_NAME));
+        if (Common.getDeployMode() == null) {
+            Common.setDeployMode(DeployMode.CLIENT);
+        }
+        boolean startWithSavePoint =
+                
Boolean.parseBoolean(requestParams.get(RestConstant.IS_START_WITH_SAVE_POINT));
         RestJobExecutionEnvironment restJobExecutionEnvironment =
                 new RestJobExecutionEnvironment(
                         jobConfig,
                         config,
                         textCommandService.getNode(),
-                        Boolean.parseBoolean(
-                                
requestParams.get(RestConstant.IS_START_WITH_SAVE_POINT)),
-                        
Long.parseLong(requestParams.get(RestConstant.JOB_ID)));
+                        startWithSavePoint,
+                        startWithSavePoint
+                                ? 
Long.parseLong(requestParams.get(RestConstant.JOB_ID))
+                                : null);

Review Comment:
   Can we report error more clear if we start with savepoint but without put 
jobId in params. Seem like it will report NPE at now. I think the error message 
should more clear.



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