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 2015/08/17 17:25:53 UTC

ambari git commit: AMBARI-12791 Add ability to move Metrics Collector to another host (akovalenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk 9d9b6c70e -> 9d8164796


AMBARI-12791 Add ability to move Metrics Collector to another host (akovalenko)


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

Branch: refs/heads/trunk
Commit: 9d81647962ef46e6fcd4cdaf4bc7d9d98a102683
Parents: 9d9b6c7
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Mon Aug 17 18:22:10 2015 +0300
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Mon Aug 17 18:25:21 2015 +0300

----------------------------------------------------------------------
 .../main/service/reassign/step4_controller.js   | 21 +++++++++++++++-----
 .../app/models/stack_service_component.js       |  2 +-
 2 files changed, 17 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9d816479/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 e6d2cc1..1fc8d4e 100644
--- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js
@@ -59,6 +59,12 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
   hostComponents: [],
 
   /**
+   * List of components, that do not need reconfiguration for moving to another host
+   * Reconfigure command will be skipped
+   */
+  componentsWithoutReconfiguration: ['METRICS_COLLECTOR'],
+
+  /**
    * Map with lists of unrelated services.
    * Used to define list of services to stop/start.
    */
@@ -329,12 +335,13 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
    * remove unneeded tasks
    */
   removeUnneededTasks: function () {
-    if(this.isComponentWithDB()) {
+    var componentName = this.get('content.reassign.component_name');
+    if (this.isComponentWithDB()) {
       var db_type = this.get('content.databaseType');
       var is_remote_db = this.get('content.serviceProperties.is_remote_db');
 
 
-      if(is_remote_db || db_type !== 'mysql') {
+      if (is_remote_db || db_type !== 'mysql') {
         this.removeTasks(['configureMySqlServer', 'startMySqlServer', 'restartMySqlServer', 'cleanMySqlServer', 'configureMySqlServer']);
       }
 
@@ -343,16 +350,16 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
       }
     }
 
-    if ( this.get('content.reassign.component_name') !== 'MYSQL_SERVER' && !this.isComponentWithDB()) {
+    if (componentName !== 'MYSQL_SERVER' && !this.isComponentWithDB()) {
       this.removeTasks(['configureMySqlServer', 'startMySqlServer', 'restartMySqlServer', 'cleanMySqlServer', 'startNewMySqlServer', 'configureMySqlServer']);
     }
 
-    if ( this.get('content.reassign.component_name') === 'MYSQL_SERVER' ) {
+    if (componentName === 'MYSQL_SERVER') {
       this.removeTasks(['cleanMySqlServer']);
     }
 
     if (this.get('content.hasManualSteps')) {
-      if (this.get('content.reassign.component_name') === 'NAMENODE' && App.get('isHaEnabled')) {
+      if (componentName === 'NAMENODE' && App.get('isHaEnabled')) {
         // Only for reassign NameNode with HA enabled
         this.removeTasks(['deleteHostComponents', 'startRequiredServices']);
       } else {
@@ -361,6 +368,10 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
     } else {
       this.removeTasks(['startZooKeeperServers', 'startNameNode']);
     }
+
+    if (this.get('componentsWithoutReconfiguration').contains(componentName)) {
+      this.removeTasks(['reconfigure']);
+    }
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/9d816479/ambari-web/app/models/stack_service_component.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack_service_component.js b/ambari-web/app/models/stack_service_component.js
index bd8dcbc..a763c1e 100644
--- a/ambari-web/app/models/stack_service_component.js
+++ b/ambari-web/app/models/stack_service_component.js
@@ -77,7 +77,7 @@ App.StackServiceComponent = DS.Model.extend({
 
   /** @property {Boolean} isReassignable - component supports reassign action **/
   isReassignable: function() {
-    return ['NAMENODE', 'SECONDARY_NAMENODE', 'JOBTRACKER', 'RESOURCEMANAGER', 'APP_TIMELINE_SERVER', 'OOZIE_SERVER', 'WEBHCAT_SERVER', 'HIVE_SERVER', 'HIVE_METASTORE', 'MYSQL_SERVER'].contains(this.get('componentName'));
+    return ['NAMENODE', 'SECONDARY_NAMENODE', 'JOBTRACKER', 'RESOURCEMANAGER', 'APP_TIMELINE_SERVER', 'OOZIE_SERVER', 'WEBHCAT_SERVER', 'HIVE_SERVER', 'HIVE_METASTORE', 'MYSQL_SERVER', 'METRICS_COLLECTOR'].contains(this.get('componentName'));
   }.property('componentName'),
 
   /** @property {Boolean} isRollinRestartAllowed - component supports rolling restart action **/