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 xg...@apache.org on 2016/03/29 07:18:40 UTC
hadoop git commit: YARN-4863. AHS Security login should be in
serviceInit() instead of serviceStart(). Contributed by Junping Du
Repository: hadoop
Updated Branches:
refs/heads/trunk 1f004b336 -> 80182809a
YARN-4863. AHS Security login should be in serviceInit() instead of serviceStart(). Contributed by Junping Du
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/80182809
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/80182809
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/80182809
Branch: refs/heads/trunk
Commit: 80182809aed76fb9522d25db9bf5e445395dd573
Parents: 1f004b3
Author: Xuan <xg...@apache.org>
Authored: Mon Mar 28 22:17:45 2016 -0700
Committer: Xuan <xg...@apache.org>
Committed: Mon Mar 28 22:17:45 2016 -0700
----------------------------------------------------------------------
.../ApplicationHistoryServer.java | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/80182809/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 cedbd2e..d241077 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
@@ -86,7 +86,14 @@ public class ApplicationHistoryServer extends CompositeService {
@Override
protected void serviceInit(Configuration conf) throws Exception {
- // init timeline services first
+
+ // do security login first.
+ try {
+ doSecureLogin(conf);
+ } catch(IOException ie) {
+ throw new YarnRuntimeException("Failed to login", ie);
+ }
+ // init timeline services
timelineStore = createTimelineStore(conf);
addIfService(timelineStore);
secretManagerService = createTimelineDelegationTokenSecretManagerService(conf);
@@ -111,12 +118,6 @@ public class ApplicationHistoryServer extends CompositeService {
@Override
protected void serviceStart() throws Exception {
- try {
- doSecureLogin(getConfig());
- } catch(IOException ie) {
- throw new YarnRuntimeException("Failed to login", ie);
- }
-
super.serviceStart();
startWebApp();
}