You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by vi...@apache.org on 2016/01/13 23:29:36 UTC
[08/17] hadoop git commit: YARN-2859.addendum: fix the remaining
issue from the previous patch
YARN-2859.addendum: fix the remaining issue from the previous patch
(cherry picked from commit f114e728da6e19f3d35ff0cfef9fceea26aa5d46)
(cherry picked from commit be65d319fae8f8644c46ee7c44108ce72dafc9c7)
(cherry picked from commit fe67c6f43f80f32b15f362179ea2082967d861d1)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d738e2e8
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d738e2e8
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d738e2e8
Branch: refs/heads/branch-2.7.2
Commit: d738e2e8633ff95d9e9813d325aca1fc99b29520
Parents: 10a6298
Author: Xuan <xg...@apache.org>
Authored: Thu Nov 19 10:07:16 2015 -0800
Committer: Vinod Kumar Vavilapalli (I am also known as @tshooter.) <vi...@apache.org>
Committed: Wed Jan 13 11:41:13 2016 -0800
----------------------------------------------------------------------
.../ApplicationHistoryServer.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/d738e2e8/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 f915181..7fb900d 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
@@ -131,10 +131,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();
}
/**
@@ -321,6 +325,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.";