ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject git commit: AMBARI-6752. Resource Manager HA: after enabling RM HA and moving standby Resource Manager to another host, it does not start. (akovalenko)
Date Wed, 06 Aug 2014 11:07:47 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b240fa307 -> 7554662d5


AMBARI-6752. Resource Manager HA: after enabling RM HA and moving standby Resource Manager
to another host, it does not start. (akovalenko)


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

Branch: refs/heads/trunk
Commit: 7554662d5744461f44100d93f9f1b9633bba7d96
Parents: b240fa3
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Wed Aug 6 14:04:58 2014 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Wed Aug 6 14:04:58 2014 +0300

----------------------------------------------------------------------
 .../main/service/reassign/step2_controller.js   | 14 +++++++++++--
 .../main/service/reassign/step4_controller.js   | 22 ++++++++++++++++++++
 .../app/controllers/wizard/step5_controller.js  |  4 ++--
 .../templates/main/admin/highAvailability.hbs   |  2 +-
 4 files changed, 37 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7554662d/ambari-web/app/controllers/main/service/reassign/step2_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign/step2_controller.js b/ambari-web/app/controllers/main/service/reassign/step2_controller.js
index cc80f07..0d1bd19 100644
--- a/ambari-web/app/controllers/main/service/reassign/step2_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step2_controller.js
@@ -28,11 +28,21 @@ App.ReassignMasterWizardStep2Controller = App.WizardStep5Controller.extend({
     if (App.get('isHaEnabled')) {
       this.get('multipleComponents').push('NAMENODE');
     }
-    this._super();
-    if (this.get('content.reassign.component_name') === "NAMENODE" && !this.get('content.masterComponentHosts').findProperty('component',
"SECONDARY_NAMENODE")) {
+    this.clearStep();
+    this.renderHostInfo();
+    this.loadStepCallback(this.loadComponents(), this);
+
+    // if moving NameNode with HA enabled
+    if (this.get('content.reassign.component_name') === "NAMENODE" && App.get('isHaEnabled'))
{
       this.set('showCurrentHost', false);
       this.set('componentToRebalance', 'NAMENODE');
       this.incrementProperty('rebalanceComponentHostsCounter');
+
+    // if moving ResourceManager with HA enabled
+    } else if (this.get('content.reassign.component_name') === "RESOURCEMANAGER" &&
App.get('isRMHaEnabled')) {
+      this.set('showCurrentHost', false);
+      this.set('componentToRebalance', 'RESOURCEMANAGER');
+      this.incrementProperty('rebalanceComponentHostsCounter');
     } else {
       this.set('showCurrentHost', true);
       this.rebalanceSingleComponentHosts(this.get('content.reassign.component_name'));

http://git-wip-us.apache.org/repos/asf/ambari/blob/7554662d/ambari-web/app/controllers/main/service/reassign/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign/step4_controller.js b/ambari-web/app/controllers/main/service/reassign/step4_controller.js
index da80cbf..fbcaa6f 100644
--- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js
@@ -413,6 +413,10 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
       this.setSpecificNamenodeConfigs(configs, targetHostName);
     }
 
+    if (componentName === 'RESOURCEMANAGER') {
+      this.setSpecificResourceMangerConfigs(configs, targetHostName);
+    }
+
     this.saveClusterStatus(secureConfigs, this.getComponentDir(configs, componentName));
     this.saveConfigsToServer(configs);
   },
@@ -462,6 +466,24 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
   },
 
   /**
+   * set specific configs which applies only to ResourceManager component
+   * @param configs
+   * @param targetHostName
+   */
+  setSpecificResourceMangerConfigs: function (configs, targetHostName) {
+    var sourceHostName = this.get('content.reassignHosts.source');
+
+    if (App.get('isHadoop2Stack') && App.get('isRMHaEnabled')) {
+      if (configs['yarn-site']['yarn.resourcemanager.hostname.rm1'] === sourceHostName) {
+        configs['yarn-site']['yarn.resourcemanager.hostname.rm1'] = targetHostName;
+      } else {
+        configs['yarn-site']['yarn.resourcemanager.hostname.rm2'] = targetHostName;
+      }
+    }
+
+  },
+
+  /**
    * set secure configs for component
    * @param secureConfigs
    * @param configs

http://git-wip-us.apache.org/repos/asf/ambari/blob/7554662d/ambari-web/app/controllers/wizard/step5_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step5_controller.js b/ambari-web/app/controllers/wizard/step5_controller.js
index 15c5549..0c6af07 100644
--- a/ambari-web/app/controllers/wizard/step5_controller.js
+++ b/ambari-web/app/controllers/wizard/step5_controller.js
@@ -216,7 +216,7 @@ App.WizardStep5Controller = Em.Controller.extend({
     this.clearStep();
     this.renderHostInfo();
     if (App.supports.serverRecommendValidate ) {
-      this.loadComponentRecommendationsFromServer(this.loadStepCallback);
+      this.loadComponentsRecommendationsFromServer(this.loadStepCallback);
     } else {
       this.loadComponentsRecommendationsLocally(this.loadStepCallback);
     }
@@ -305,7 +305,7 @@ App.WizardStep5Controller = Em.Controller.extend({
    * Get recommendations info from API
    * @return {undefined}
    */
-  loadComponentRecommendationsFromServer: function(callback) {
+  loadComponentsRecommendationsFromServer: function(callback) {
     var self = this;
 
     if (App.router.get('installerController.recommendations') !== undefined) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/7554662d/ambari-web/app/templates/main/admin/highAvailability.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability.hbs b/ambari-web/app/templates/main/admin/highAvailability.hbs
index 6ffaac2..1c657d2 100644
--- a/ambari-web/app/templates/main/admin/highAvailability.hbs
+++ b/ambari-web/app/templates/main/admin/highAvailability.hbs
@@ -40,8 +40,8 @@
     {{/if}}
   {{/if}}
   {{#if view.supportRMHA}}
-    {{#if App.isRMHaEnabled}}
     <div class="rm-ha">
+    {{#if App.isRMHaEnabled}}
         <p class="text-success">
           {{t admin.rm_highAvailability.enabled}}
         </p>


Mime
View raw message