hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Devaraj K (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-3087) the REST server (web server) for per-node aggregator does not work if it runs inside node manager
Date Thu, 05 Feb 2015 17:33:35 GMT

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

Devaraj K commented on YARN-3087:
---------------------------------

I did some investigation on this issue and I found below is the cause for the issue. GuiceFilter
is maintaining some static variables and accessing these for request processing. These values
are getting overwriting for each new WebApp starting in the same process and holding only
the last WebApp details. That's why we see that we can access only the last started WebApp.
And also the same WebApp can be accessed in all the started WebApp’s web ports due to the
GuiceFilter static data instead of their own WebApp.

{code:title=com.google.inject.servlet.GuiceFilter|borderStyle=solid}
  static final ThreadLocal<Context> localContext = new ThreadLocal<Context>();
  static volatile FilterPipeline pipeline = new DefaultFilterPipeline();
  **********
  static volatile WeakReference<ServletContext> servletContext =
      new WeakReference<ServletContext>(null);

  **********
  @Inject
  static void setPipeline(FilterPipeline pipeline) {
   ********
    GuiceFilter.pipeline = pipeline;
{code}

I tried to override GuiceFilter with custom filter( extends GuiceFilter) to avoid these static
data overwriting. But I see using the hard coded GuiceFilter.class in different places of
guice-servlet module during initialization and request processing which again causes the problem.

{code:title=com.google.inject.servlet.InternalServletModule|borderStyle=solid}
  @Override
  protected void configure() {
  *******
  requestStaticInjection(GuiceFilter.class);
  *******
{code}

{code:title=com.google.inject.servlet.ServletScopes|borderStyle=solid}
	  ********
          HttpServletRequest request = GuiceFilter.getRequest();
	  ********
{code}


Please share your thoughts on this issue. Thanks.


> the REST server (web server) for per-node aggregator does not work if it runs inside
node manager
> -------------------------------------------------------------------------------------------------
>
>                 Key: YARN-3087
>                 URL: https://issues.apache.org/jira/browse/YARN-3087
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>            Reporter: Sangjin Lee
>            Assignee: Devaraj K
>
> This is related to YARN-3030. YARN-3030 sets up a per-node timeline aggregator and the
associated REST server. It runs fine as a standalone process, but does not work if it runs
inside the node manager due to possible collisions of servlet mapping.
> Exception:
> {noformat}
> org.apache.hadoop.yarn.webapp.WebAppException: /v2/timeline: controller for v2 not found
> 	at org.apache.hadoop.yarn.webapp.Router.resolveDefault(Router.java:232)
> 	at org.apache.hadoop.yarn.webapp.Router.resolve(Router.java:140)
> 	at org.apache.hadoop.yarn.webapp.Dispatcher.service(Dispatcher.java:134)
> 	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)
> ...
> {noformat}



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

Mime
View raw message