You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2013/12/03 13:48:35 UTC
git commit: AMBARI-3952. SNameNode should not be available in
AddServiceWizard if HA is enabled. (onechiporenko)
Updated Branches:
refs/heads/trunk 0120a4d47 -> 34c6d94b4
AMBARI-3952. SNameNode should not be available in AddServiceWizard if HA is enabled. (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/34c6d94b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/34c6d94b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/34c6d94b
Branch: refs/heads/trunk
Commit: 34c6d94b4123662929665f180d1502a22b1e0d06
Parents: 0120a4d
Author: Oleg Nechiporenko <cv...@yahoo.com>
Authored: Tue Dec 3 14:45:16 2013 +0200
Committer: Oleg Nechiporenko <cv...@yahoo.com>
Committed: Tue Dec 3 14:48:29 2013 +0200
----------------------------------------------------------------------
ambari-web/app/controllers/wizard/step5_controller.js | 13 +++++++++++++
ambari-web/app/controllers/wizard/step7_controller.js | 10 ++++++++++
2 files changed, 23 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/34c6d94b/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 c1ab556..32c852a 100644
--- a/ambari-web/app/controllers/wizard/step5_controller.js
+++ b/ambari-web/app/controllers/wizard/step5_controller.js
@@ -33,6 +33,10 @@ App.WizardStep5Controller = Em.Controller.extend({
return this.get('content.controllerName') == 'reassignMasterController';
}.property('content.controllerName'),
+ isAddServiceWizard: function() {
+ return this.get('content.controllerName') == 'addServiceController';
+ }.property('content.controllerName'),
+
isReassignHive: function () {
return this.get('servicesMasters').objectAt(0) && this.get('servicesMasters').objectAt(0).component_name == 'HIVE_SERVER' && this.get('isReassignWizard');
}.property('isReassignWizard', 'servicesMasters'),
@@ -219,6 +223,7 @@ App.WizardStep5Controller = Em.Controller.extend({
* @param masterComponents
*/
renderComponents:function (masterComponents) {
+ var self = this;
var services = this.get('content.services')
.filterProperty('isInstalled', true).mapProperty('serviceName'); //list of shown services
var hosts = this.get('hosts');
@@ -236,6 +241,14 @@ App.WizardStep5Controller = Em.Controller.extend({
masterComponents.forEach(function (item) {
+ if (item.component_name == 'SECONDARY_NAMENODE') {
+ if (self.get('isAddServiceWizard')) {
+ if (!App.HostComponent.find().someProperty('componentName', 'SECONDARY_NAMENODE')) {
+ return;
+ }
+ }
+ }
+
var componentObj = Ember.Object.create(item);
console.log("TRACE: render master component name is: " + item.component_name);
http://git-wip-us.apache.org/repos/asf/ambari/blob/34c6d94b/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index 85a2f25..46058f3 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -123,6 +123,16 @@ App.WizardStep7Controller = Em.Controller.extend({
this.get('selectedServiceNames').forEach(function(serviceName) {
serviceConfigs.findProperty('serviceName', serviceName).set('selected', true);
});
+
+ // Remove SNameNode if HA is enabled
+ if (!App.HostComponent.find().someProperty('componentName', 'SECONDARY_NAMENODE')) {
+ configs = serviceConfigs.findProperty('serviceName', 'HDFS').configs;
+ var removedConfigs = configs.filterProperty('category', 'SNameNode');
+ removedConfigs.map(function(config) {
+ configs = configs.without(config);
+ });
+ serviceConfigs.findProperty('serviceName', 'HDFS').configs = configs;
+ }
}
this.set('stepConfigs', serviceConfigs);