You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Devaraj K (Assigned) (JIRA)" <ji...@apache.org> on 2012/04/17 18:12:18 UTC

[jira] [Assigned] (MAPREDUCE-4093) Improve RM WebApp start up when proxy address is not set

     [ https://issues.apache.org/jira/browse/MAPREDUCE-4093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Devaraj K reassigned MAPREDUCE-4093:
------------------------------------

    Assignee: Devaraj K
    
> 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
>            Assignee: Devaraj K
>         Attachments: MAPREDUCE-4093.patch
>
>
> {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