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/05/20 17:16:33 UTC
ambari git commit: AMBARI-11265. The Storm nimbus.seeds Property
Needs To Be Stored As An Array (akovalenko)
Repository: ambari
Updated Branches:
refs/heads/trunk f24ae8c0b -> 3c673e8e2
AMBARI-11265. The Storm nimbus.seeds Property Needs To Be Stored As An Array (akovalenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3c673e8e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3c673e8e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3c673e8e
Branch: refs/heads/trunk
Commit: 3c673e8e20736348b3879337830e23350a98dca8
Parents: f24ae8c
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Wed May 20 16:23:01 2015 +0300
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Wed May 20 18:16:03 2015 +0300
----------------------------------------------------------------------
ambari-web/app/controllers/main/host/details.js | 2 +-
ambari-web/app/controllers/wizard/step8_controller.js | 2 +-
ambari-web/app/mixins/common/configs/configs_saver.js | 6 ++++--
3 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/3c673e8e/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index 9c88a41..4c747fd 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -690,7 +690,7 @@ App.MainHostDetailsController = Em.Controller.extend({
attributes[item.type] = item.properties_attributes || {};
}, this);
- configs['storm-site']['nimbus.seeds'] = stormNimbusHosts.join(',');
+ configs['storm-site']['nimbus.seeds'] = JSON.stringify(stormNimbusHosts).replace(/"/g, "'");
if (stormNimbusHosts.length > 1) {
// for HA Nimbus
http://git-wip-us.apache.org/repos/asf/ambari/blob/3c673e8e/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index d1989c2..81f2a8c 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -1725,7 +1725,7 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, App.wiz
var configs = this.get('configs').filterProperty('filename', 'storm-site.xml');
var stormProperties = {};
configs.forEach(function (_configProperty) {
- if (_configProperty.name == "storm.zookeeper.servers") {
+ if (["nimbus.seeds", "storm.zookeeper.servers"].contains(_configProperty.name)) {
stormProperties[_configProperty.name] = JSON.stringify(_configProperty.value).replace(/"/g, "'");
} else {
stormProperties[_configProperty.name] = _configProperty.value;
http://git-wip-us.apache.org/repos/asf/ambari/blob/3c673e8e/ambari-web/app/mixins/common/configs/configs_saver.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/configs/configs_saver.js b/ambari-web/app/mixins/common/configs/configs_saver.js
index acef483..7b2af7a 100644
--- a/ambari-web/app/mixins/common/configs/configs_saver.js
+++ b/ambari-web/app/mixins/common/configs/configs_saver.js
@@ -537,7 +537,8 @@ App.ConfigsSaverMixin = Em.Mixin.create({
}
switch (name) {
case 'storm.zookeeper.servers':
- if (Object.prototype.toString.call(value) === '[object Array]' ) {
+ case 'nimbus.seeds':
+ if (Em.isArray(value)) {
return JSON.stringify(value).replace(/"/g, "'");
} else {
return value;
@@ -1124,7 +1125,8 @@ App.ConfigsSaverMixin = Em.Mixin.create({
setServerConfigValue: function (configName, value) {
switch (configName) {
case 'storm.zookeeper.servers':
- if( Object.prototype.toString.call( value ) === '[object Array]' ) {
+ case 'nimbus.seeds':
+ if(Em.isArray(value)) {
return JSON.stringify(value).replace(/"/g, "'");
} else {
return value;