|
@@ -194,6 +194,12 @@ public class ResourceManager extends CompositeService implements Recoverable {
|
|
this.conf = conf;
|
|
this.conf = conf;
|
|
this.rmContext = new RMContextImpl();
|
|
this.rmContext = new RMContextImpl();
|
|
|
|
|
|
|
|
+ // Set HA configuration should be done before login
|
|
|
|
+ this.rmContext.setHAEnabled(HAUtil.isHAEnabled(this.conf));
|
|
|
|
+ if (this.rmContext.isHAEnabled()) {
|
|
|
|
+ HAUtil.verifyAndSetConfiguration(this.conf);
|
|
|
|
+ }
|
|
|
|
+
|
|
// Set UGI and do login
|
|
// Set UGI and do login
|
|
// If security is enabled, use login user
|
|
// If security is enabled, use login user
|
|
// If security is not enabled, use current user
|
|
// If security is not enabled, use current user
|
|
@@ -245,11 +251,6 @@ public class ResourceManager extends CompositeService implements Recoverable {
|
|
adminService = createAdminService();
|
|
adminService = createAdminService();
|
|
addService(adminService);
|
|
addService(adminService);
|
|
rmContext.setRMAdminService(adminService);
|
|
rmContext.setRMAdminService(adminService);
|
|
-
|
|
|
|
- this.rmContext.setHAEnabled(HAUtil.isHAEnabled(this.conf));
|
|
|
|
- if (this.rmContext.isHAEnabled()) {
|
|
|
|
- HAUtil.verifyAndSetConfiguration(this.conf);
|
|
|
|
- }
|
|
|
|
|
|
|
|
createAndInitActiveServices();
|
|
createAndInitActiveServices();
|
|
|
|
|