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] [Created] (YARN-887) WebAppProxyServlet should not create HttpClient object for each request
Date Thu, 27 Jun 2013 13:14:21 GMT
Devaraj K created YARN-887:

             Summary: WebAppProxyServlet should not create HttpClient object for each request
                 Key: YARN-887
                 URL: https://issues.apache.org/jira/browse/YARN-887
             Project: Hadoop YARN
          Issue Type: Bug
          Components: resourcemanager
    Affects Versions: 3.0.0, 2.1.0-beta
            Reporter: Devaraj K
            Assignee: Devaraj K

 private static void proxyLink(HttpServletRequest req, 
      HttpServletResponse resp, URI link, Cookie c, String proxyHost)
      throws IOException {
    org.apache.commons.httpclient.URI uri = 
      new org.apache.commons.httpclient.URI(link.toString(), false);
    HttpClientParams params = new HttpClientParams();
    params.setBooleanParameter(HttpClientParams.ALLOW_CIRCULAR_REDIRECTS, true);
    HttpClient client = new HttpClient(params);

WebAppProxyServlet is creating HttpClient object for every request. If we have multiple Jobs
running with many tasks, if we want to get the report/monitor these through web, webproxy
server is opening many files and it is causing too many files open error.

This can be avoided by having one HttpClient object with MultiThreadedHttpConnectionManager
and use the same for all requests which avoids to open many files. 

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

View raw message