Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0-alpha, 3.0.0-alpha1
-
None
Description
ResourceManager.java
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)); }
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.