Return-Path: X-Original-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 600FB9679 for ; Thu, 19 Apr 2012 19:43:04 +0000 (UTC) Received: (qmail 6040 invoked by uid 500); 19 Apr 2012 19:43:04 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 5999 invoked by uid 500); 19 Apr 2012 19:43:04 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-issues@hadoop.apache.org Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 5987 invoked by uid 99); 19 Apr 2012 19:43:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2012 19:43:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2012 19:43:01 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BB33A3A4F2E for ; Thu, 19 Apr 2012 19:42:40 +0000 (UTC) Date: Thu, 19 Apr 2012 19:42:40 +0000 (UTC) From: "Robert Joseph Evans (Commented) (JIRA)" To: mapreduce-issues@hadoop.apache.org Message-ID: <1728816207.7183.1334864560768.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <302789417.1246.1333211307348.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (MAPREDUCE-4093) Improve RM WebApp start up when proxy address is not set MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MAPREDUCE-4093?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13257727#comment-13257727 ] Robert Joseph Evans commented on MAPREDUCE-4093: ------------------------------------------------ Looks good to me too +1. > 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 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