hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Devaraj K (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MAPREDUCE-4093) Improve RM WebApp start up when proxy address is not set
Date Sat, 31 Mar 2012 16:28:27 GMT
Improve RM WebApp start up when proxy address is not set
--------------------------------------------------------

                 Key: MAPREDUCE-4093
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4093
             Project: Hadoop Map/Reduce
          Issue Type: Improvement
          Components: mrv2
    Affects Versions: 2.0.0, 3.0.0
            Reporter: Devaraj K


{code:title=ResourceManager.java|borderStyle=solid}
  protected void startWepApp() {
    Builder<ApplicationMasterService> builder = 
      WebApps.$for("cluster", ApplicationMasterService.class, masterService, "ws").at(
          this.conf.get(YarnConfiguration.RM_WEBAPP_ADDRESS,
          YarnConfiguration.DEFAULT_RM_WEBAPP_ADDRESS)); 
    if(YarnConfiguration.getRMWebAppHostAndPort(conf).
        equals(YarnConfiguration.getProxyHostAndPort(conf))) {
      AppReportFetcher fetcher = new AppReportFetcher(conf, getClientRMService());
      builder.withServlet(ProxyUriUtils.PROXY_SERVLET_NAME, 
          ProxyUriUtils.PROXY_PATH_SPEC, WebAppProxyServlet.class);
      builder.withAttribute(WebAppProxy.FETCHER_ATTRIBUTE, fetcher);
      String proxy = YarnConfiguration.getProxyHostAndPort(conf);
      String[] proxyParts = proxy.split(":");
      builder.withAttribute(WebAppProxy.PROXY_HOST_ATTRIBUTE, proxyParts[0]);

    }
    webApp = builder.start(new RMWebApp(this));
  }
{code} 

In the above code, YarnConfiguration.getProxyHostAndPort(conf) is invoking twice. getProxyHostAndPort()
internally invokes getRMWebAppHostAndPort() which resolves RM web app address when proxy address
is not set.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message