Return-Path: X-Original-To: apmail-hadoop-common-commits-archive@www.apache.org Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 390E617DBB for ; Thu, 19 Nov 2015 18:09:02 +0000 (UTC) Received: (qmail 65153 invoked by uid 500); 19 Nov 2015 18:09:01 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 65086 invoked by uid 500); 19 Nov 2015 18:09:01 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 65077 invoked by uid 99); 19 Nov 2015 18:09:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Nov 2015 18:09:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 02175E17DA; Thu, 19 Nov 2015 18:08:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: xgong@apache.org To: common-commits@hadoop.apache.org Message-Id: <3e505f9d1e85498885229ad02faaa80c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: hadoop git commit: YARN-2859.addendum: fix the remaining issue from the previous patch Date: Thu, 19 Nov 2015 18:08:51 +0000 (UTC) Repository: hadoop Updated Branches: refs/heads/trunk 1c4951a7a -> f114e728d YARN-2859.addendum: fix the remaining issue from the previous patch Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f114e728 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f114e728 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f114e728 Branch: refs/heads/trunk Commit: f114e728da6e19f3d35ff0cfef9fceea26aa5d46 Parents: 1c4951a Author: Xuan Authored: Thu Nov 19 10:07:16 2015 -0800 Committer: Xuan Committed: Thu Nov 19 10:08:38 2015 -0800 ---------------------------------------------------------------------- hadoop-yarn-project/CHANGES.txt | 3 +++ .../ApplicationHistoryServer.java | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/f114e728/hadoop-yarn-project/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index b2786a2..aec3616 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -1972,6 +1972,9 @@ Release 2.6.2 - 2015-10-28 YARN-3798. ZKRMStateStore shouldn't create new session without occurrance of SESSIONEXPIED. (ozawa and Varun Saxena) + YARN-2859. ApplicationHistoryServer binds to default port 8188 in MiniYARNCluster. + (Vinod Kumar Vavilapalli via xgong) + Release 2.6.1 - 2015-09-23 INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/f114e728/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java index 21e1c1a..cda84a2 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java @@ -141,10 +141,14 @@ public class ApplicationHistoryServer extends CompositeService { return this.ahsClientService; } + private InetSocketAddress getListenerAddress() { + return this.webApp.httpServer().getConnectorAddress(0); + } + @Private @VisibleForTesting public int getPort() { - return this.webApp.httpServer().getConnectorAddress(0).getPort(); + return this.getListenerAddress().getPort(); } /** @@ -331,6 +335,10 @@ public class ApplicationHistoryServer extends CompositeService { httpServer.addContext(uiWebAppContext, true); } httpServer.start(); + conf.updateConnectAddr(YarnConfiguration.TIMELINE_SERVICE_BIND_HOST, + YarnConfiguration.TIMELINE_SERVICE_WEBAPP_ADDRESS, + YarnConfiguration.DEFAULT_TIMELINE_SERVICE_WEBAPP_ADDRESS, + this.getListenerAddress()); LOG.info("Instantiating AHSWebApp at " + getPort()); } catch (Exception e) { String msg = "AHSWebApp failed to start.";