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/trunk@1328090 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5b35f7df64
commit
d09cf903ab
|
@ -149,6 +149,9 @@ Release 2.0.0 - UNRELEASED
|
|||
|
||||
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
|
||||
|
||||
BUG FIXES
|
||||
|
|
|
@ -443,14 +443,14 @@ public class ResourceManager extends CompositeService implements Recoverable {
|
|||
WebApps.$for("cluster", ApplicationMasterService.class, masterService, "ws").at(
|
||||
this.conf.get(YarnConfiguration.RM_WEBAPP_ADDRESS,
|
||||
YarnConfiguration.DEFAULT_RM_WEBAPP_ADDRESS));
|
||||
String proxyHostAndPort = YarnConfiguration.getProxyHostAndPort(conf);
|
||||
if(YarnConfiguration.getRMWebAppHostAndPort(conf).
|
||||
equals(YarnConfiguration.getProxyHostAndPort(conf))) {
|
||||
equals(proxyHostAndPort)) {
|
||||
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(":");
|
||||
String[] proxyParts = proxyHostAndPort.split(":");
|
||||
builder.withAttribute(WebAppProxy.PROXY_HOST_ATTRIBUTE, proxyParts[0]);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue