You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2014/08/08 12:05:32 UTC

git commit: AMBARI-6770. Moving ResourceManager/JobTracker requires stopping unrelated services. (akovalenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk b6851a877 -> 1d31b9cd4


AMBARI-6770. Moving ResourceManager/JobTracker requires stopping unrelated services. (akovalenko)


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

Branch: refs/heads/trunk
Commit: 1d31b9cd45ae191565d24aeecb14ebafbc9411f8
Parents: b6851a8
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Thu Aug 7 17:59:56 2014 +0300
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Fri Aug 8 13:00:22 2014 +0300

----------------------------------------------------------------------
 .../main/service/reassign/step4_controller.js   | 25 +++++++++++++-------
 1 file changed, 17 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1d31b9cd/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 fbcaa6f..35c6cdc 100644
--- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js
@@ -29,7 +29,15 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
   multiTaskCounter: 0,
 
   hostComponents: [],
-  restartYarnMRComponents: false,
+
+  /**
+   * Map with lists of unrelated services.
+   * Used to define list of services to stop/start.
+   */
+  unrelatedServicesMap: {
+    'JOBTRACKER': ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM'],
+    'RESOURCEMANAGER': ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM']
+  },
 
   /**
    * additional configs with template values
@@ -184,7 +192,6 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
     } else {
       this.set('hostComponents', [this.get('content.reassign.component_name')]);
     }
-    this.set('restartYarnMRComponents', ['RESOURCEMANAGER', 'JOBTRACKER'].contains(this.get('content.reassign.component_name')));
     this.set('serviceName', [this.get('content.reassign.service_id')]);
     this._super();
   },
@@ -269,9 +276,10 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
         "state": "INSTALLED"
       }
     };
-    if (this.get('restartYarnMRComponents')) {
-      var list = App.Service.find().mapProperty("serviceName").without("HDFS").join(',');
-      data.context = "Stop without HDFS";
+    var unrelatedServices = this.get('unrelatedServicesMap')[this.get('content.reassign.component_name')];
+    if (unrelatedServices) {
+      var list = App.Service.find().mapProperty("serviceName").filter(function(s){return !unrelatedServices.contains(s)}).join(',');
+      data.context = "Stop required services";
       data.urlParams = "ServiceInfo/service_name.in(" + list + ")";
     } else {
       data.context = "Stop all services";
@@ -560,13 +568,14 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
   },
 
   startServices: function () {
-    if (this.get('restartYarnMRComponents')) {
-      var list = App.Service.find().mapProperty("serviceName").without("HDFS").join(',');
+    var unrelatedServices = this.get('unrelatedServicesMap')[this.get('content.reassign.component_name')];
+    if (unrelatedServices) {
+      var list = App.Service.find().mapProperty("serviceName").filter(function(s){return !unrelatedServices.contains(s)}).join(',');
       var conf = {
         name: 'common.services.update',
         sender: this,
         data: {
-          "context": "Start without HDFS",
+          "context": "Start required services",
           "ServiceInfo": {
             "state": "STARTED"
           },