You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2016/01/15 18:34:07 UTC
[43/50] [abbrv] ambari git commit: AMBARI-14651. Add ability to move
MR2 History Server (akovalenko)
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/fea14c27
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fea14c27
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fea14c27
Branch: refs/heads/branch-dev-patch-upgrade
Commit: fea14c271d9b73e541cd401eea5844bd8c3fd270
Parents: c0e2269
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Wed Jan 13 20:16:44 2016 +0200
Committer: Nate Cole <nc...@hortonworks.com>
Committed: Thu Jan 14 11:43:29 2016 -0500
----------------------------------------------------------------------
.../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/fea14c27/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/fea14c27/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/fea14c27/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)'
+ ]
}
];