From e439d3bb39b99c99a9ebb8ce0b906229eb634b7f Mon Sep 17 00:00:00 2001 From: Robert Joseph Evans Date: Thu, 19 Apr 2012 19:44:55 +0000 Subject: [PATCH] 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 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../hadoop/yarn/server/resourcemanager/ResourceManager.java | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 6e13ab06041..b1953020650 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -45,6 +45,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 diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java index 22056065d0a..2336ba8285e 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java @@ -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]); }