Repository: hadoop Updated Branches: refs/heads/branch-2 5a3db2156 -> be65d319f
YARN-2859.addendum: fix the remaining issue from the previous patch (cherry picked from commit f114e728da6e19f3d35ff0cfef9fceea26aa5d46) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/be65d319 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/be65d319 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/be65d319 Branch: refs/heads/branch-2 Commit: be65d319fae8f8644c46ee7c44108ce72dafc9c7 Parents: 5a3db21 Author: Xuan <xg...@apache.org> Authored: Thu Nov 19 10:07:16 2015 -0800 Committer: Xuan <xg...@apache.org> Committed: Thu Nov 19 10:09:48 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/be65d319/hadoop-yarn-project/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 567686f..6a75a07 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -1928,6 +1928,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/be65d319/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.";