You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/02/27 00:19:00 UTC

[jira] [Work logged] (SUBMARINE-394) Change submit job response status in JobManagerRestApi

     [ https://issues.apache.org/jira/browse/SUBMARINE-394?focusedWorklogId=393866&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-393866 ]

ASF GitHub Bot logged work on SUBMARINE-394:
--------------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Feb/20 00:18
            Start Date: 27/Feb/20 00:18
    Worklog Time Spent: 10m 
      Work Description: pingsutw commented on pull request #190: SUBMARINE-394. Change submit job response status in JobManagerRestApi
URL: https://github.com/apache/submarine/pull/190
 
 
   ### What is this PR for?
   If job submit successfully we should return `OK`(200) instead of `ACCEPTED`(202) 
   If job submit fail, success should be false
   
   
   ### What type of PR is it?
   [Bug Fix]
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   https://issues.apache.org/jira/browse/SUBMARINE-394
   
   ### How should this be tested?
   https://travis-ci.org/pingsutw/hadoop-submarine/builds/655167779
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * Does the licenses files need update? No
   * Is there breaking changes for older versions? No
   * Does this needs documentation? No
   
 
----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 393866)
    Remaining Estimate: 0h
            Time Spent: 10m

> Change submit job response status in JobManagerRestApi
> ------------------------------------------------------
>
>                 Key: SUBMARINE-394
>                 URL: https://issues.apache.org/jira/browse/SUBMARINE-394
>             Project: Apache Submarine
>          Issue Type: Bug
>            Reporter: Kevin Su
>            Assignee: Kevin Su
>            Priority: Trivial
>              Labels: pull-request-available
>             Fix For: 0.4.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> If job submit successfully we should return *ok(200)* instead of *ACCEPTED(202)* 
> if job submit fail, success should be false
> {code:java}
> if (!jobSpec.validate()) {
>  return new JsonResponse.Builder<String>(Response.Status.ACCEPTED)
>  .success(true).result("Invalid params.").build();
> }
> try {
>  Job job = JobManager.getInstance().submitJob(jobSpec);
>  return new JsonResponse.Builder<Job>(Response.Status.ACCEPTED)
>  .success(true).result(job).build();
> } catch (UnsupportedJobTypeException e) {
>  return new JsonResponse.Builder<String>(Response.Status.ACCEPTED)
>  .success(true).result(e.getMessage()).build();
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org