You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/06/17 23:20:43 UTC
svn commit: r1493944 - in /incubator/ambari/trunk/ambari-web/app:
controllers/wizard/step8_controller.js data/config_properties.js
Author: yusaku
Date: Mon Jun 17 21:20:43 2013
New Revision: 1493944
URL: http://svn.apache.org/r1493944
Log:
AMBARI-2367. HCFS properties in core-site are being set to null. (Chad Roberts via yusaku)
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
incubator/ambari/trunk/ambari-web/app/data/config_properties.js
Modified: incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js?rev=1493944&r1=1493943&r2=1493944&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js Mon Jun 17 21:20:43 2013
@@ -1359,8 +1359,17 @@ App.WizardStep8Controller = Em.Controlle
createGlobalSiteObj: function () {
var globalSiteProperties = {};
- //this.get('globals').filterProperty('domain', 'global').forEach(function (_globalSiteObj) {
- this.get('globals').forEach(function (_globalSiteObj) {
+ var globalSiteObj = this.get('globals');
+ var isHCFSSelected = this.get('selectedServices').someProperty('serviceName', 'HCFS');
+
+ // screen out the HCFS-specific global config entries when they are not required
+ if (!isHCFSSelected) {
+ globalSiteObj = globalSiteObj.filter(function(_config) {
+ return _config.name.indexOf("fs_glusterfs") < 0;
+ });
+ }
+
+ globalSiteObj.forEach(function (_globalSiteObj) {
// do not pass any globals whose name ends with _host or _hosts
if (!/_hosts?$/.test(_globalSiteObj.name)) {
// append "m" to JVM memory options except for hadoop_heapsize
@@ -1393,13 +1402,20 @@ App.WizardStep8Controller = Em.Controlle
var isHcatSelected = this.get('selectedServices').someProperty('serviceName', 'WEBHCAT');
var hcatUser = this.get('globals').someProperty('name', 'hcat_user') ? this.get('globals').findProperty('name', 'hcat_user').value : null;
var isHCFSSelected = this.get('selectedServices').someProperty('serviceName', 'HCFS');
+
+ // screen out the HCFS-specific core-site.xml entries when they are not needed
+ if (!isHCFSSelected) {
+ coreSiteObj = coreSiteObj.filter(function(_config) {
+ return _config.name.indexOf("fs.glusterfs") < 0;
+ });
+ }
coreSiteObj.forEach(function (_coreSiteObj) {
if ((isOozieSelected || (_coreSiteObj.name != 'hadoop.proxyuser.' + oozieUser + '.hosts' && _coreSiteObj.name != 'hadoop.proxyuser.' + oozieUser + '.groups')) && (isHiveSelected || (_coreSiteObj.name != 'hadoop.proxyuser.' + hiveUser + '.hosts' && _coreSiteObj.name != 'hadoop.proxyuser.' + hiveUser + '.groups')) && (isHcatSelected || (_coreSiteObj.name != 'hadoop.proxyuser.' + hcatUser + '.hosts' && _coreSiteObj.name != 'hadoop.proxyuser.' + hcatUser + '.groups'))) {
coreSiteProperties[_coreSiteObj.name] = _coreSiteObj.value;
this._recordHostOverrideFromObj(_coreSiteObj, 'core-site', 'version1', this);
}
if (isHCFSSelected && _coreSiteObj.name == "fs.default.name") {
- coreSiteProperties[_coreSiteObj.name] = this.get('globals').someProperty('name', 'fs_default_name') ? this.get('globals').findProperty('name', 'fs_default_name').value : null;
+ coreSiteProperties[_coreSiteObj.name] = this.get('globals').someProperty('name', 'fs_glusterfs_default_name') ? this.get('globals').findProperty('name', 'fs_glusterfs_default_name').value : null;
}
console.log("STEP*: name of the property is: " + _coreSiteObj.name);
console.log("STEP8: value of the property is: " + _coreSiteObj.value);
Modified: incubator/ambari/trunk/ambari-web/app/data/config_properties.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/data/config_properties.js?rev=1493944&r1=1493943&r2=1493944&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/data/config_properties.js (original)
+++ incubator/ambari/trunk/ambari-web/app/data/config_properties.js Mon Jun 17 21:20:43 2013
@@ -468,7 +468,7 @@ module.exports =
},
{
"id": "puppet var",
- "name": "fs_default_name",
+ "name": "fs_glusterfs_default_name",
"displayName": "Gluster default fs name",
"description": "Gluster default filesystem name (glusterfs://{MasterFQDN}:9000)",
"defaultValue": "glusterfs://{firstHost}:9000",