[ 
https://issues.apache.org/jira/browse/YARN-873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13712197#comment-13712197
 ] 

Devaraj K commented on YARN-873:
--------------------------------

The latest patch overall looks good to me. These are things I feel which we can 
take care,

1. Application -status command returns exit code as 0 when the application 
doesn't exist. Can we return the non-zero exit status code when the application 
doesn't exist?

2. In TestClientRMService.java, 
{code:xml}
+    try {
+      GetApplicationReportResponse applicationReport = rmService
+          .getApplicationReport(request);
+    } catch (ApplicationNotFoundException ex) {
+      getExpectedException = true;
+      Assert.assertEquals(ex.getMessage(),
+          "Application with id '" + request.getApplicationId()
+              + "' doesn't exist in RM.");
+    }
+    Assert.assertTrue(getExpectedException);
{code}

Can we fail after getApplicationReport using Assert.fail() instead of having 
boolean flag and checking. And also applicationReport variable is never used.

3. 
{code:xml}
  // If the RM doesn't have the application, provide the response with
  // application report as null and let the clients to handle.
{code}

Do we have other JIRA to fix the same for kill application, if not can we file 
a JIRA?
                
> YARNClient.getApplicationReport(unknownAppId) returns a null report
> -------------------------------------------------------------------
>
>                 Key: YARN-873
>                 URL: https://issues.apache.org/jira/browse/YARN-873
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>    Affects Versions: 2.1.0-beta
>            Reporter: Bikas Saha
>            Assignee: Xuan Gong
>         Attachments: YARN-873.1.patch, YARN-873.2.patch
>
>
> How can the client find out that app does not exist?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to