liuxunorg commented on a change in pull request #249: SUBMARINE-455. Support 
find/patch/delete job in submarine-server REST
URL: https://github.com/apache/submarine/pull/249#discussion_r398277186
 
 

 ##########
 File path: 
submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/K8sJobSubmitter.java
 ##########
 @@ -101,98 +101,78 @@ public String getSubmitterType() {
   }
 
   @Override
-  public Job submitJob(JobSpec jobSpec)
-      throws InvalidSpecException {
+  public Job createJob(JobSpec jobSpec) throws InvalidSpecException {
     Job job = null;
-
-    boolean success = createJob(JobSpecParser.parseJob(jobSpec));
-    if (success) {
-      job = new Job();
-      job.setName(jobSpec.getName());
-    } else {
-      LOG.error("Failed to create job." + jobSpec.toString());
+    try {
+      MLJob mlJob = JobSpecParser.parseJob(jobSpec);
 
 Review comment:
   I think, you should first determine whether the job name already exists, and 
return an accurate error message if it exists.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to