ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject ambari git commit: AMBARI-14651. Add ability to move MR2 History Server (akovalenko)
Date Wed, 13 Jan 2016 19:13:36 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 69c3e0d0e -> 21e855127


AMBARI-14651. Add ability to move MR2 History Server (akovalenko)


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

Branch: refs/heads/trunk
Commit: 21e855127cc802073ab0b20082871998e2877f38
Parents: 69c3e0d
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Wed Jan 13 20:16:44 2016 +0200
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Wed Jan 13 21:13:11 2016 +0200

----------------------------------------------------------------------
 .../main/service/reassign/step4_controller.js   | 68 +++++++++-----------
 .../app/models/stack_service_component.js       |  3 +-
 .../service/reassign/step4_controller_test.js   |  6 ++
 3 files changed, 39 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/21e85512/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 d475ea3..c06a2ea 100644
--- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js
@@ -191,6 +191,15 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
           'javax.jdo.option.ConnectionURL': 'jdbc:mysql://<replace-value>/hive?createDatabaseIfNotExist=true'
         }
       }
+    },
+    {
+      componentName: 'HISTORYSERVER',
+      configs: {
+        'mapred-site': {
+          'mapreduce.jobhistory.webapp.address': '<replace-value>:19888',
+          'mapreduce.jobhistory.address': '<replace-value>:10020'
+        }
+      }
     }
   ],
 
@@ -518,6 +527,20 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
     });
   },
 
+  serviceToConfigSiteMap: {
+    'NAMENODE': ['hdfs-site', 'core-site'],
+    'SECONDARY_NAMENODE': ['hdfs-site', 'core-site'],
+    'JOBTRACKER': ['mapred-site'],
+    'RESOURCEMANAGER': ['yarn-site'],
+    'WEBHCAT_SERVER': ['webhcat-site'],
+    'APP_TIMELINE_SERVER': ['yarn-site', 'yarn-env'],
+    'OOZIE_SERVER': ['oozie-site', 'core-site', 'oozie-env'],
+    'HIVE_SERVER': ['hive-site', 'webhcat-site', 'hive-env', 'core-site'],
+    'HIVE_METASTORE': ['hive-site', 'webhcat-site', 'hive-env', 'core-site'],
+    'MYSQL_SERVER': ['hive-site'],
+    'HISTORYSERVER': ['mapred-site']
+  },
+
   /**
    * construct URL parameters for config call
    * @param componentName
@@ -526,50 +549,21 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
    */
   getConfigUrlParams: function (componentName, data) {
     var urlParams = [];
-    switch (componentName) {
-      case 'NAMENODE':
-        urlParams.push('(type=hdfs-site&tag=' + data.Clusters.desired_configs['hdfs-site'].tag
+ ')');
-        urlParams.push('(type=core-site&tag=' + data.Clusters.desired_configs['core-site'].tag
+ ')');
+
+    this.get('serviceToConfigSiteMap')[componentName].forEach(function(site){
+      urlParams.push('(type=' + site + '&tag=' + data.Clusters.desired_configs[site].tag
+ ')');
+    });
+
+    // specific cases for NameNode component
+    if (componentName === 'NAMENODE') {
         if (App.Service.find().someProperty('serviceName', 'HBASE')) {
           urlParams.push('(type=hbase-site&tag=' + data.Clusters.desired_configs['hbase-site'].tag
+ ')');
         }
         if (App.Service.find().someProperty('serviceName', 'ACCUMULO')) {
           urlParams.push('(type=accumulo-site&tag=' + data.Clusters.desired_configs['accumulo-site'].tag
+ ')');
         }
-        break;
-      case 'SECONDARY_NAMENODE':
-        urlParams.push('(type=hdfs-site&tag=' + data.Clusters.desired_configs['hdfs-site'].tag
+ ')');
-        urlParams.push('(type=core-site&tag=' + data.Clusters.desired_configs['core-site'].tag
+ ')');
-        break;
-      case 'JOBTRACKER':
-        urlParams.push('(type=mapred-site&tag=' + data.Clusters.desired_configs['mapred-site'].tag
+ ')');
-        break;
-      case 'RESOURCEMANAGER':
-        urlParams.push('(type=yarn-site&tag=' + data.Clusters.desired_configs['yarn-site'].tag
+ ')');
-        break;
-      case 'WEBHCAT_SERVER':
-        urlParams.push('(type=webhcat-site&tag=' + data.Clusters.desired_configs['webhcat-site'].tag
+ ')');
-        break;
-      case 'APP_TIMELINE_SERVER':
-        urlParams.push('(type=yarn-site&tag=' + data.Clusters.desired_configs['yarn-site'].tag
+ ')');
-        urlParams.push('(type=yarn-env&tag=' + data.Clusters.desired_configs['yarn-env'].tag
+ ')');
-        break;
-      case 'OOZIE_SERVER':
-        urlParams.push('(type=oozie-site&tag=' + data.Clusters.desired_configs['oozie-site'].tag
+ ')');
-        urlParams.push('(type=core-site&tag=' + data.Clusters.desired_configs['core-site'].tag
+ ')');
-        urlParams.push('(type=oozie-env&tag=' + data.Clusters.desired_configs['oozie-env'].tag
+ ')');
-        break;
-      case 'HIVE_SERVER':
-      case 'HIVE_METASTORE':
-        urlParams.push('(type=hive-site&tag=' + data.Clusters.desired_configs['hive-site'].tag
+ ')');
-        urlParams.push('(type=webhcat-site&tag=' + data.Clusters.desired_configs['webhcat-site'].tag
+ ')');
-        urlParams.push('(type=hive-env&tag=' + data.Clusters.desired_configs['hive-env'].tag
+ ')');
-        urlParams.push('(type=core-site&tag=' + data.Clusters.desired_configs['core-site'].tag
+ ')');
-        break;
-      case 'MYSQL_SERVER':
-        urlParams.push('(type=hive-site&tag=' + data.Clusters.desired_configs['hive-site'].tag
+ ')');
-        break;
     }
+
     return urlParams;
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/21e85512/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 ea8e910..6107dca 100644
--- a/ambari-web/app/models/stack_service_component.js
+++ b/ambari-web/app/models/stack_service_component.js
@@ -68,7 +68,8 @@ App.StackServiceComponent = DS.Model.extend({
   isRestartable: Em.computed.not('isClient'),
 
   /** @property {Boolean} isReassignable - component supports reassign action **/
-  isReassignable: Em.computed.existsIn('componentName', ['NAMENODE', 'SECONDARY_NAMENODE',
'JOBTRACKER', 'RESOURCEMANAGER', 'APP_TIMELINE_SERVER', 'OOZIE_SERVER', 'WEBHCAT_SERVER',
'HIVE_SERVER', 'HIVE_METASTORE', 'MYSQL_SERVER', 'METRICS_COLLECTOR']),
+  isReassignable: Em.computed.existsIn('componentName', ['NAMENODE', 'SECONDARY_NAMENODE',
'JOBTRACKER', 'RESOURCEMANAGER', 'APP_TIMELINE_SERVER', 'OOZIE_SERVER',
+    'WEBHCAT_SERVER', 'HIVE_SERVER', 'HIVE_METASTORE', 'MYSQL_SERVER', 'METRICS_COLLECTOR',
'HISTORYSERVER']),
 
   /** @property {Boolean} isRollinRestartAllowed - component supports rolling restart action
**/
   isRollinRestartAllowed: function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/21e85512/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
index 11bcae7..e920ace 100644
--- a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
+++ b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
@@ -620,6 +620,12 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
         result: [
           '(type=hive-site&tag=10)'
         ]
+      },
+      {
+        componentName: 'HISTORYSERVER',
+        result: [
+          '(type=mapred-site&tag=4)'
+        ]
       }
     ];
 


Mime
View raw message