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

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

Some more comments on the patch:

1. No need to handle NotFoundException in ApplicationHistoryClientService, 
right?

2. Fix the following indent issues.
{code}
+    if (report != null) {
+    ApplicationReport appReport = report.appReport;
+      if (appReport != null) {
+        return appReport;
+      }
+    }
{code}
{code}
+    } catch (ApplicationNotFoundException e) {
+      //This exception is expected.
+    Assert.assertTrue(e.getMessage().
{code}

I tried the query 
{{http://localhost:8188/ws/v1/applicationhistory/apps/application_1417818619773_0002?user.name=zshen}}.
 I obtained the following exception in the timeline server log, and saw not 
response from my browser.

{code}
2014-12-05 14:33:43,791 ERROR org.mortbay.log: 
/ws/v1/applicationhistory/apps/application_1417818619773_0002
java.lang.IllegalStateException: STREAM
        at org.mortbay.jetty.Response.getWriter(Response.java:616)
        at org.apache.hadoop.yarn.webapp.View.writer(View.java:141)
        at org.apache.hadoop.yarn.webapp.view.TextView.writer(TextView.java:38)
        at org.apache.hadoop.yarn.webapp.view.TextView.echo(TextView.java:46)
        at org.apache.hadoop.yarn.webapp.view.TextView.puts(TextView.java:57)
        at org.apache.hadoop.yarn.webapp.view.HtmlPage.render(HtmlPage.java:81)
        at org.apache.hadoop.yarn.webapp.Dispatcher.render(Dispatcher.java:197)
        at org.apache.hadoop.yarn.webapp.Dispatcher.service(Dispatcher.java:145)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at 
com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
        at 
com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
        at 
com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
        at 
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
        at 
com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:900)
        at 
com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:834)
        at 
com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:795)
        at 
com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
        at 
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
        at 
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
        at 
org.apache.hadoop.http.lib.StaticUserWebFilter$StaticUserFilter.doFilter(StaticUserWebFilter.java:96)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
        at 
org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:592)
        at 
org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter.doFilter(DelegationTokenAuthenticationFilter.java:277)
        at 
org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:555)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
        at 
org.apache.hadoop.http.HttpServer2$QuotingInputFilter.doFilter(HttpServer2.java:1204)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
        at org.apache.hadoop.http.NoCacheFilter.doFilter(NoCacheFilter.java:45)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
        at org.apache.hadoop.http.NoCacheFilter.doFilter(NoCacheFilter.java:45)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
        at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
        at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
        at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:322)
        at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
        at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
{code}

I worked on trunk and before applying the patch, I can get 500 response as we 
expected before, and no exception in the timeline server. Would you please take 
a look?

> 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, 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