hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From naganarasimha...@apache.org
Subject hadoop git commit: YARN-6072. RM unable to start in secure mode. Contributed by Ajith S.
Date Thu, 12 Jan 2017 01:11:29 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk e6f13fe5d -> a6b06f717


YARN-6072. RM unable to start in secure mode. Contributed by Ajith S.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a6b06f71
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a6b06f71
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a6b06f71

Branch: refs/heads/trunk
Commit: a6b06f71797ad1ed9edbcef279bcf7d9e569f955
Parents: e6f13fe
Author: Naganarasimha <naganarasimha_gr@apache.org>
Authored: Thu Jan 12 06:40:41 2017 +0530
Committer: Naganarasimha <naganarasimha_gr@apache.org>
Committed: Thu Jan 12 06:40:41 2017 +0530

----------------------------------------------------------------------
 .../server/resourcemanager/AdminService.java    |  2 +-
 .../server/resourcemanager/ResourceManager.java | 26 +++++++++++++-------
 2 files changed, 18 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/a6b06f71/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/AdminService.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/AdminService.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/AdminService.java
index 04ee5d8..86bb896 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/AdminService.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/AdminService.java
@@ -708,7 +708,7 @@ public class AdminService extends CompositeService implements
       }
       refreshClusterMaxPriority();
     } catch (Exception ex) {
-      throw new ServiceFailedException(ex.getMessage());
+      throw new ServiceFailedException("RefreshAll operation failed", ex);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/a6b06f71/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java
index 0c9d095..886f4ab 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java
@@ -272,15 +272,6 @@ public class ResourceManager extends CompositeService implements Recoverable
{
     this.rmContext.setHAEnabled(HAUtil.isHAEnabled(this.conf));
     if (this.rmContext.isHAEnabled()) {
       HAUtil.verifyAndSetConfiguration(this.conf);
-
-      // If the RM is configured to use an embedded leader elector,
-      // initialize the leader elector.
-      if (HAUtil.isAutomaticFailoverEnabled(conf) &&
-          HAUtil.isAutomaticFailoverEmbedded(conf)) {
-        EmbeddedElector elector = createEmbeddedElector();
-        addIfService(elector);
-        rmContext.setLeaderElectorService(elector);
-      }
     }
 
     // Set UGI and do login
@@ -298,10 +289,27 @@ public class ResourceManager extends CompositeService implements Recoverable
{
     addIfService(rmDispatcher);
     rmContext.setDispatcher(rmDispatcher);
 
+    // The order of services below should not be changed as services will be
+    // started in same order
+    // As elector service needs admin service to be initialized and started,
+    // first we add admin service then elector service
+
     adminService = createAdminService();
     addService(adminService);
     rmContext.setRMAdminService(adminService);
 
+    // elector must be added post adminservice
+    if (this.rmContext.isHAEnabled()) {
+      // If the RM is configured to use an embedded leader elector,
+      // initialize the leader elector.
+      if (HAUtil.isAutomaticFailoverEnabled(conf)
+          && HAUtil.isAutomaticFailoverEmbedded(conf)) {
+        EmbeddedElector elector = createEmbeddedElector();
+        addIfService(elector);
+        rmContext.setLeaderElectorService(elector);
+      }
+    }
+
     rmContext.setYarnConfiguration(conf);
     
     createAndInitActiveServices(false);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message