MAPREDUCE-4093. Improve RM WebApp start up when proxy address is not set (Devaraj K vai bobby)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1328091 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
eec2fd9f74
commit
e439d3bb39
|
@ -45,6 +45,9 @@ Release 2.0.0 - UNRELEASED
|
||||||
|
|
||||||
MAPREDUCE-4103. Fix HA docs for changes to shell command fencer args (todd)
|
MAPREDUCE-4103. Fix HA docs for changes to shell command fencer args (todd)
|
||||||
|
|
||||||
|
MAPREDUCE-4093. Improve RM WebApp start up when proxy address is not set
|
||||||
|
(Devaraj K vai bobby)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -443,14 +443,14 @@ public class ResourceManager extends CompositeService implements Recoverable {
|
||||||
WebApps.$for("cluster", ApplicationMasterService.class, masterService, "ws").at(
|
WebApps.$for("cluster", ApplicationMasterService.class, masterService, "ws").at(
|
||||||
this.conf.get(YarnConfiguration.RM_WEBAPP_ADDRESS,
|
this.conf.get(YarnConfiguration.RM_WEBAPP_ADDRESS,
|
||||||
YarnConfiguration.DEFAULT_RM_WEBAPP_ADDRESS));
|
YarnConfiguration.DEFAULT_RM_WEBAPP_ADDRESS));
|
||||||
|
String proxyHostAndPort = YarnConfiguration.getProxyHostAndPort(conf);
|
||||||
if(YarnConfiguration.getRMWebAppHostAndPort(conf).
|
if(YarnConfiguration.getRMWebAppHostAndPort(conf).
|
||||||
equals(YarnConfiguration.getProxyHostAndPort(conf))) {
|
equals(proxyHostAndPort)) {
|
||||||
AppReportFetcher fetcher = new AppReportFetcher(conf, getClientRMService());
|
AppReportFetcher fetcher = new AppReportFetcher(conf, getClientRMService());
|
||||||
builder.withServlet(ProxyUriUtils.PROXY_SERVLET_NAME,
|
builder.withServlet(ProxyUriUtils.PROXY_SERVLET_NAME,
|
||||||
ProxyUriUtils.PROXY_PATH_SPEC, WebAppProxyServlet.class);
|
ProxyUriUtils.PROXY_PATH_SPEC, WebAppProxyServlet.class);
|
||||||
builder.withAttribute(WebAppProxy.FETCHER_ATTRIBUTE, fetcher);
|
builder.withAttribute(WebAppProxy.FETCHER_ATTRIBUTE, fetcher);
|
||||||
String proxy = YarnConfiguration.getProxyHostAndPort(conf);
|
String[] proxyParts = proxyHostAndPort.split(":");
|
||||||
String[] proxyParts = proxy.split(":");
|
|
||||||
builder.withAttribute(WebAppProxy.PROXY_HOST_ATTRIBUTE, proxyParts[0]);
|
builder.withAttribute(WebAppProxy.PROXY_HOST_ATTRIBUTE, proxyParts[0]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue