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

Zhijie Shen commented on YARN-2900:
-----------------------------------

Thanks for working on this bug, [~mitdesai] and [~jeagles]! Here's my feedback 
on this patch:

1. Debug message is better to be wrapped in the {{if (LOG.isDebugEnabled())}} 
block.

2. NotFoundException is web only stuff. It shouldn't thrown from 
ApplicationHistoryManagerOnTimelineStore. Why not just returning null? If 
returning null, no change is required in WebServices, right?

3. In ApplicationHistoryClientService, for those getXXXs() methods, we don't 
throw exception, but just return the empty list.

4. In ApplicationHistoryClientService, take {{getApplicationReport}} for an 
example.
{code}
 GetApplicationReportResponse response =
            GetApplicationReportResponse.newInstance(history
              .getApplication(applicationId));
{code}
could be changed to
{code}
ApplicationReport appReport = history.getApplication(applicationId);
if (appReport == null) {
  throw new ApplicationNotFoundException();
}
GetApplicationReportResponse response =
    GetApplicationReportResponse.newInstance(appReport);
{code}
Other get-single-report methods can be changed accordingly.


> Application (Attempt and Container) Not Found in AHS results in Internal 
> Server Error (500)
> -------------------------------------------------------------------------------------------
>
>                 Key: YARN-2900
>                 URL: https://issues.apache.org/jira/browse/YARN-2900
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>            Reporter: Jonathan Eagles
>            Assignee: Mit Desai
>         Attachments: YARN-2900.patch, YARN-2900.patch, YARN-2900.patch, 
> YARN-2900.patch, YARN-2900.patch
>
>
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryManagerImpl.convertToApplicationReport(ApplicationHistoryManagerImpl.java:128)
>       at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryManagerImpl.getApplication(ApplicationHistoryManagerImpl.java:118)
>       at 
> org.apache.hadoop.yarn.server.webapp.WebServices$2.run(WebServices.java:222)
>       at 
> org.apache.hadoop.yarn.server.webapp.WebServices$2.run(WebServices.java:219)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at javax.security.auth.Subject.doAs(Subject.java:415)
>       at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1679)
>       at 
> org.apache.hadoop.yarn.server.webapp.WebServices.getApp(WebServices.java:218)
>       ... 59 more



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to