This is an automated email from the ASF dual-hosted git repository.

liuxun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git


The following commit(s) were added to refs/heads/master by this push:
     new a59bf9e  SUBMARINE-671. Correct the typo (parseNotebookResponseObject)
a59bf9e is described below

commit a59bf9ed73d11a0e4026c69aa5138ec3b5c4e333
Author: Ryan Lo <[email protected]>
AuthorDate: Tue Nov 3 13:32:34 2020 +0800

    SUBMARINE-671. Correct the typo (parseNotebookResponseObject)
    
    ### What is this PR for?
    Correct the typo "parseNotebookResponseObject" to 
"parseExperimentResponseObject"
    
    ### What type of PR is it?
    [Improvement]
    
    ### Todos
    * [ ] - Task
    
    ### What is the Jira issue?
    [SUBMARINE-671](https://issues.apache.org/jira/browse/SUBMARINE-671)
    
    ### How should this be tested?
    [travis 
ci](https://travis-ci.org/github/lowc1012/submarine/builds/741047568)
    
    ### Screenshots (if appropriate)
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? No
    
    Author: Ryan Lo <[email protected]>
    
    Closes #445 from lowc1012/SUBMARINE-671 and squashes the following commits:
    
    efd247a [Ryan Lo] SUBMARINE-671. Correct the typo 
(parseNotebookResponseObject)
---
 .../apache/submarine/server/submitter/k8s/K8sSubmitter.java | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git 
a/submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/K8sSubmitter.java
 
b/submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/K8sSubmitter.java
index 5eea96c..78a427e 100644
--- 
a/submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/K8sSubmitter.java
+++ 
b/submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/K8sSubmitter.java
@@ -121,7 +121,7 @@ public class K8sSubmitter implements Submitter {
       MLJob mlJob = ExperimentSpecParser.parseJob(spec);
       Object object = api.createNamespacedCustomObject(mlJob.getGroup(), 
mlJob.getVersion(),
           mlJob.getMetadata().getNamespace(), mlJob.getPlural(), mlJob, 
"true");
-      experiment = parseNotebookResponseObject(object, 
ParseOp.PARSE_OP_RESULT);
+      experiment = parseExperimentResponseObject(object, 
ParseOp.PARSE_OP_RESULT);
     } catch (InvalidSpecException e) {
       LOG.error("K8s submitter: parse Job object failed by " + e.getMessage(), 
e);
       throw new SubmarineRuntimeException(400, e.getMessage());
@@ -140,7 +140,7 @@ public class K8sSubmitter implements Submitter {
       MLJob mlJob = ExperimentSpecParser.parseJob(spec);
       Object object = api.getNamespacedCustomObject(mlJob.getGroup(), 
mlJob.getVersion(),
           mlJob.getMetadata().getNamespace(), mlJob.getPlural(), 
mlJob.getMetadata().getName());
-      experiment = parseNotebookResponseObject(object, 
ParseOp.PARSE_OP_RESULT);
+      experiment = parseExperimentResponseObject(object, 
ParseOp.PARSE_OP_RESULT);
     } catch (InvalidSpecException e) {
       throw new SubmarineRuntimeException(200, e.getMessage());
     } catch (ApiException e) {
@@ -157,7 +157,7 @@ public class K8sSubmitter implements Submitter {
       Object object = api.patchNamespacedCustomObject(mlJob.getGroup(), 
mlJob.getVersion(),
           mlJob.getMetadata().getNamespace(), mlJob.getPlural(), 
mlJob.getMetadata().getName(),
           mlJob);
-      experiment = parseNotebookResponseObject(object, 
ParseOp.PARSE_OP_RESULT);
+      experiment = parseExperimentResponseObject(object, 
ParseOp.PARSE_OP_RESULT);
     } catch (InvalidSpecException e) {
       throw new SubmarineRuntimeException(200, e.getMessage());
     } catch (ApiException e) {
@@ -174,7 +174,7 @@ public class K8sSubmitter implements Submitter {
       Object object = api.deleteNamespacedCustomObject(mlJob.getGroup(), 
mlJob.getVersion(),
           mlJob.getMetadata().getNamespace(), mlJob.getPlural(), 
mlJob.getMetadata().getName(),
           MLJobConverter.toDeleteOptionsFromMLJob(mlJob), null, null, null);
-      experiment = parseNotebookResponseObject(object, 
ParseOp.PARSE_OP_DELETE);
+      experiment = parseExperimentResponseObject(object, 
ParseOp.PARSE_OP_DELETE);
     } catch (InvalidSpecException e) {
       throw new SubmarineRuntimeException(200, e.getMessage());
     } catch (ApiException e) {
@@ -183,7 +183,8 @@ public class K8sSubmitter implements Submitter {
     return experiment;
   }
 
-  private Experiment parseNotebookResponseObject(Object object, ParseOp op) 
throws SubmarineRuntimeException {
+  private Experiment parseExperimentResponseObject(Object object, ParseOp op)
+          throws SubmarineRuntimeException {
     Gson gson = new JSON().getGson();
     String jsonString = gson.toJson(object);
     LOG.info("Upstream response JSON: {}", jsonString);
@@ -269,7 +270,7 @@ public class K8sSubmitter implements Submitter {
       throw new SubmarineRuntimeException(500, "K8s Submitter parse upstream 
response failed.");
     } catch (ApiException e) {
       LOG.error("K8s submitter: parse Notebook object failed by " + 
e.getMessage(), e);
-      throw new SubmarineRuntimeException(e.getCode(), "K8s submitter: parse 
Job object failed by " +
+      throw new SubmarineRuntimeException(e.getCode(), "K8s submitter: parse 
Notebook object failed by " +
           e.getMessage());
     }
     return notebook;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to