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 2014/02/21 20:58:35 UTC

git commit: AMBARI-4788. NameNode fails to start due to 'fs.defaultFS' being null. (jaimin via yusaku)

Repository: ambari
Updated Branches:
  refs/heads/trunk fea7b6222 -> 822cd75a2


AMBARI-4788. NameNode fails to start due to 'fs.defaultFS' being null. (jaimin via yusaku)


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

Branch: refs/heads/trunk
Commit: 822cd75a2a722bf34717f6858bed43bb239d517e
Parents: fea7b62
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Fri Feb 21 11:58:12 2014 -0800
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Fri Feb 21 11:58:12 2014 -0800

----------------------------------------------------------------------
 .../app/controllers/wizard/step8_controller.js      | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/822cd75a/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 4280f47..e8ba8e3 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -1254,17 +1254,25 @@ App.WizardStep8Controller = Em.Controller.extend({
     var hiveUser = this.get('globals').someProperty('name', 'hive_user') ? this.get('globals').findProperty('name', 'hive_user').value : null;
     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 isGLUSTERFSSelected = this.get('selectedServices').someProperty('serviceName', 'GLUSTERFS');
+
+    // screen out the GLUSTERFS-specific core-site.xml entries when they are not needed
+    if (!isGLUSTERFSSelected) {
+      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] = App.config.escapeXMLCharacters(_coreSiteObj.value);
       }
-      if (_coreSiteObj.name == "fs.default.name") {
+      if (isGLUSTERFSSelected && _coreSiteObj.name == "fs.default.name") {
         coreSiteProperties[_coreSiteObj.name] = this.get('globals').someProperty('name', 'fs_glusterfs_default_name') ? App.config.escapeXMLCharacters(this.get('globals').findProperty('name', 'fs_glusterfs_default_name').value) : null;
       }
-      if (_coreSiteObj.name == "fs.defaultFS") {
-          coreSiteProperties[_coreSiteObj.name] = this.get('globals').someProperty('name', 'glusterfs_defaultFS_name') ? App.config.escapeXMLCharacters(this.get('globals').findProperty('name', 'glusterfs_defaultFS_name').value) : null;
-        }
+      if (isGLUSTERFSSelected && _coreSiteObj.name == "fs.defaultFS") {
+        coreSiteProperties[_coreSiteObj.name] = this.get('globals').someProperty('name', 'glusterfs_defaultFS_name') ? App.config.escapeXMLCharacters(this.get('globals').findProperty('name', 'glusterfs_defaultFS_name').value) : null;
+      }
       console.log("STEP*: name of the property is: " + _coreSiteObj.name);
       console.log("STEP8: value of the property is: " + _coreSiteObj.value);
     }, this);