You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2014/07/16 14:59:43 UTC

[5/6] git commit: AMBARI-6501 Extend server-side stack definition to include metadata for additional configurations (including -env.sh files) for each service. (ababiichuk)

AMBARI-6501 Extend server-side stack definition to include metadata for additional configurations (including -env.sh files) for each service. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 6244c49babe87d8bd34126c95651c42fcedc8a76
Parents: 2636029
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Thu Jul 10 14:58:44 2014 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Wed Jul 16 15:14:08 2014 +0300

----------------------------------------------------------------------
 .../controllers/global/cluster_controller.js    |    1 -
 .../main/admin/highAvailability_controller.js   |    7 +-
 .../controllers/main/admin/misc_controller.js   |    2 +-
 .../app/controllers/main/admin/security.js      |   10 +-
 .../controllers/main/admin/security/disable.js  |    2 +-
 .../controllers/main/service/info/configs.js    |  333 ++-
 .../main/service/reassign_controller.js         |    6 +-
 .../app/controllers/wizard/step7_controller.js  |    1 -
 .../app/controllers/wizard/step8_controller.js  |  228 +-
 ambari-web/app/data/HDP2/global_properties.js   | 1934 ----------------
 ambari-web/app/data/HDP2/ha_properties.js       |    2 +-
 ambari-web/app/data/HDP2/site_properties.js     | 2156 ++++++++++++++++++
 ambari-web/app/data/global_properties.js        | 1589 -------------
 ambari-web/app/data/service_configs.js          |   18 +-
 ambari-web/app/data/site_properties.js          | 1611 ++++++++++++-
 ambari-web/app/models/quick_links.js            |    2 +-
 ambari-web/app/models/service.js                |    3 +-
 ambari-web/app/models/service_config.js         |    2 +-
 ambari-web/app/models/stack_service.js          |   44 +-
 ambari-web/app/utils/config.js                  |  118 +-
 .../app/views/common/quick_view_link_view.js    |    2 +-
 ambari-web/app/views/main/admin/security.js     |    6 +-
 .../app/views/main/admin/security/add/step2.js  |    6 +-
 23 files changed, 4083 insertions(+), 4000 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6244c49b/ambari-web/app/controllers/global/cluster_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js
index fd8ed2c..275cf44 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -314,7 +314,6 @@ App.ClusterController = Em.Controller.extend({
         service.StackServices.is_installed = false;
       },this);
       App.stackServiceMapper.map(data);
-      App.config.setPreDefinedGlobalProperties();
       App.config.setPreDefinedServiceConfigs();
       var updater = App.router.get('updateController');
       self.updateLoadStatus('stackComponents');

http://git-wip-us.apache.org/repos/asf/ambari/blob/6244c49b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability_controller.js b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
index 21ae94a..2f38124 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
@@ -17,7 +17,6 @@
  */
 
 var App = require('app');
-var totalHosts = 0;
 
 App.MainAdminHighAvailabilityController = Em.Controller.extend({
   name: 'mainAdminHighAvailabilityController',
@@ -106,8 +105,8 @@ App.MainAdminHighAvailabilityController = Em.Controller.extend({
 
   getSecurityStatusFromServerSuccessCallback: function (data) {
     var configs = data.Clusters.desired_configs;
-    if ('global' in configs) {
-      this.set('tag', configs['global'].tag);
+    if ('hadoop-env' in configs) {
+      this.set('tag', configs['hadoop-env'].tag);
       this.getServiceConfigsFromServer();
     } else {
       this.showErrorPopup(Em.I18n.t('admin.security.status.error'));
@@ -121,7 +120,7 @@ App.MainAdminHighAvailabilityController = Em.Controller.extend({
   getServiceConfigsFromServer: function () {
     var tags = [
       {
-        siteName: "global",
+        siteName: "hadoop-env",
         tagName: this.get('tag')
       }
     ];

http://git-wip-us.apache.org/repos/asf/ambari/blob/6244c49b/ambari-web/app/controllers/main/admin/misc_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/misc_controller.js b/ambari-web/app/controllers/main/admin/misc_controller.js
index a732c83..83e15a2 100644
--- a/ambari-web/app/controllers/main/admin/misc_controller.js
+++ b/ambari-web/app/controllers/main/admin/misc_controller.js
@@ -57,7 +57,7 @@ App.MainAdminMiscController = App.MainServiceInfoConfigsController.extend({
     var configGroups = App.router.get('configurationController').getConfigsByTags(this.get('serviceConfigTags'));
     var configSet = App.config.mergePreDefinedWithLoaded(configGroups, [], this.get('serviceConfigTags'), serviceName);
 
-    var misc_configs = configSet.globalConfigs.filterProperty('serviceName', this.get('selectedService')).filterProperty('category', 'Users and Groups').filterProperty('isVisible', true);
+    var misc_configs = configSet.configs.filterProperty('serviceName', this.get('selectedService')).filterProperty('category', 'Users and Groups').filterProperty('isVisible', true);
 
     misc_configs = App.config.miscConfigVisibleProperty(misc_configs, installedServices);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6244c49b/ambari-web/app/controllers/main/admin/security.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/security.js b/ambari-web/app/controllers/main/admin/security.js
index af8c096..bbf21b0 100644
--- a/ambari-web/app/controllers/main/admin/security.js
+++ b/ambari-web/app/controllers/main/admin/security.js
@@ -266,8 +266,8 @@ App.MainAdminSecurityController = Em.Controller.extend({
   getSecurityStatusFromServerSuccessCallback: function (data) {
     var configs = data.Clusters.desired_configs;
     this.set('desiredConfigs', configs);
-    if ('global' in configs && 'hdfs-site' in configs) {
-      this.set('tag.global', configs['global'].tag);
+    if ('hadoop-env' in configs && 'hdfs-site' in configs) {
+      this.set('tag.hadoop-env', configs['hadoop-env'].tag);
       this.set('tag.hdfs-site', configs['hdfs-site'].tag);
       this.getServiceConfigsFromServer();
     }
@@ -279,8 +279,8 @@ App.MainAdminSecurityController = Em.Controller.extend({
   getServiceConfigsFromServer: function () {
     var tags = [
       {
-        siteName: "global",
-        tagName: this.get('tag.global')
+        siteName: "hadoop-env",
+        tagName: this.get('tag.hadoop-env')
       },
       {
         siteName: "hdfs-site",
@@ -289,7 +289,7 @@ App.MainAdminSecurityController = Em.Controller.extend({
     ];
 
     var data = App.router.get('configurationController').getConfigsByTags(tags);
-    var configs = data.findProperty('tag', this.get('tag.global')).properties;
+    var configs = data.findProperty('tag', this.get('tag.hadoop-env')).properties;
     if (configs && (configs['security_enabled'] === 'true' || configs['security_enabled'] === true)) {
       this.set('securityEnabled', true);
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/6244c49b/ambari-web/app/controllers/main/admin/security/disable.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/security/disable.js b/ambari-web/app/controllers/main/admin/security/disable.js
index 20b8121..0191185 100644
--- a/ambari-web/app/controllers/main/admin/security/disable.js
+++ b/ambari-web/app/controllers/main/admin/security/disable.js
@@ -146,7 +146,7 @@ App.MainAdminSecurityDisableController = App.MainAdminSecurityProgressController
     } else {
       serviceConfigTags.forEach(function (_serviceConfigTags) {
         _serviceConfigTags.newTagName = 'version' + (new Date).getTime();
-        if (_serviceConfigTags.siteName === 'global') {
+        if (_serviceConfigTags.siteName === 'hadoop-env') {
           this.deleteDisabledGlobalConfigs(secureProperties, _serviceConfigTags);
           _serviceConfigTags.configs.security_enabled = 'false';
         } else {

http://git-wip-us.apache.org/repos/asf/ambari/blob/6244c49b/ambari-web/app/controllers/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js
index d6bff63..03f6b97 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -33,7 +33,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
   selectedServiceConfigTypes: [],
   selectedServiceSupportsFinal: [],
   configGroups: [],
-  globalConfigs: [],
+  allConfigs: [],
   uiConfigs: [],
   customConfig: [],
   isApplyingChanges: false,
@@ -51,8 +51,8 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
     return App.config.get('configMapping');
   }.property('App.config.configMapping'),
   configs: function () {
-    return  App.config.get('preDefinedGlobalProperties');
-  }.property('App.config.preDefinedGlobalProperties'),
+    return  App.config.get('preDefinedSiteProperties');
+  }.property('App.config.preDefinedSiteProperties'),
 
   secureConfigs: function () {
     if (App.get('isHadoop2Stack')) {
@@ -73,7 +73,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
    *
    * Example:
    * {
-   *  'global': 'version1',
    *  'hdfs-site': 'version1',
    *  'core-site': 'version1'
    * }
@@ -123,7 +122,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
     this.set('filter', '');
     this.get('filterColumns').setEach('selected', false);
     this.get('stepConfigs').clear();
-    this.get('globalConfigs').clear();
+    this.get('allConfigs').clear();
     this.get('uiConfigs').clear();
     this.get('customConfig').clear();
     this.set('loadedGroupToOverrideSiteToTagMap', {});
@@ -342,33 +341,29 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
     var advancedConfigs = this.get('advancedConfigs');
     //STEP 4: Load on-site config by service from server
     var configGroups = App.router.get('configurationController').getConfigsByTags(this.get('serviceConfigTags'));
-    //STEP 5: Merge global and on-site configs with pre-defined
+    //STEP 5: Merge on-site configs with pre-defined
     var configSet = App.config.mergePreDefinedWithLoaded(configGroups, advancedConfigs, this.get('serviceConfigTags'), serviceName);
     configSet = App.config.syncOrderWithPredefined(configSet);
     //var serviceConfigs = this.getSitesConfigProperties(advancedConfigs);
     var configs = configSet.configs;
-    //put global configs into globalConfigs to save them separately
-    this.set('globalConfigs', configSet.globalConfigs);
-
     //STEP 6: add advanced configs
-    //App.config.addAdvancedConfigs(configs, advancedConfigs, serviceName);
+    App.config.addAdvancedConfigs(configs, advancedConfigs, serviceName);
     //STEP 7: add custom configs
     App.config.addCustomConfigs(configs);
     //put properties from capacity-scheduler.xml into one config with textarea view
     if (this.get('content.serviceName') === 'YARN' && !App.supports.capacitySchedulerUi) {
       configs = App.config.fileConfigsIntoTextarea(configs, 'capacity-scheduler.xml');
     }
+    this.set('allConfigs', configs);
     //STEP 8: add configs as names of host components
-    this.addHostNamesToGlobalConfig();
-
-    var allConfigs = this.get('globalConfigs').concat(configs);
+    this.addHostNamesToConfig();
     //STEP 9: Load and add overriden configs of group
-    App.config.loadServiceConfigGroupOverrides(allConfigs, this.loadedGroupToOverrideSiteToTagMap, this.get('configGroups'), this.onLoadOverrides, this);
+    App.config.loadServiceConfigGroupOverrides(this.get('allConfigs'), this.loadedGroupToOverrideSiteToTagMap, this.get('configGroups'), this.onLoadOverrides, this);
   }.observes('selectedConfigGroup'),
 
   checkDatabaseProperties: function (serviceConfig) {
     if (!['OOZIE', 'HIVE'].contains(this.get('content.serviceName'))) return;
-    var configsToHide = ['oozie_hostname'];
+    var configsToHide = ['oozie_hostname', 'hive_hostname'];
     configsToHide.forEach(function (configName) {
       var property = serviceConfig.configs.findProperty('name', configName);
       if (property) property.set('isVisible', false);
@@ -387,37 +382,42 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
     }
 
     if (serviceName || serviceConfig.serviceName === 'MISC') {
-      //STEP 11: render configs and wrap each in ServiceConfigProperty object
-      var self = this;
       // set recommended Defaults first then load the configs (including set validator)
-      this.setRecommendedDefaults(advancedConfigs).done(function () {
-        self.loadConfigs(allConfigs, serviceConfig);
-        self.checkOverrideProperty(serviceConfig);
-        self.checkDatabaseProperties(serviceConfig);
-        self.get('stepConfigs').pushObject(serviceConfig);
-        self.set('selectedService', self.get('stepConfigs').objectAt(0));
-        self.checkForSecureConfig(self.get('selectedService'));
-        self.set('dataIsLoaded', true);
-        self.set('hash', self.getHash());
-        self.set('isInit', false);
-      });
+      var s = App.StackService.find().findProperty('serviceName', this.get('content.serviceName'));
+      var defaultsProvider = s.get('defaultsProviders');
+      if (defaultsProvider) {
+        this.getInfoForDefaults(defaultsProvider);
+      } else {
+        Em.run(this, 'setDefaults');
+      }
     } else {
       this.set('selectedService', this.get('stepConfigs').objectAt(0));
       this.checkForSecureConfig(this.get('selectedService'));
       this.set('dataIsLoaded', true);
-
       this.set('hash', this.getHash());
       this.set('isInit', false);
     }
   },
 
+  setDefaults: function(){
+    var serviceConfig = App.config.createServiceConfig(this.get('content.serviceName'));
+    this.loadConfigs(this.get('allConfigs'), serviceConfig);
+    this.checkOverrideProperty(serviceConfig);
+    this.checkDatabaseProperties(serviceConfig);
+    this.get('stepConfigs').pushObject(serviceConfig);
+    this.set('selectedService', this.get('stepConfigs').objectAt(0));
+    this.checkForSecureConfig(this.get('selectedService'));
+    this.set('dataIsLoaded', true);
+    this.set('hash', this.getHash());
+    this.set('isInit', false);
+  }.observes('defaultsInfo'),
+
   /**
    * Changes format from Object to Array
    *
    * {
    *  'core-site': 'version1',
    *  'hdfs-site': 'version1',
-   *  'global': 'version2',
    *  ...
    * }
    *
@@ -499,6 +499,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
       hosts: this.getHostsInfo(response)
     };
     this.set('defaultsInfo', defaultsInfo);
+    this.setRecommendedDefaults(this.get('advancedConfigs'));
   },
 
   /**
@@ -632,15 +633,8 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
    */
   setRecommendedDefaults: function (advancedConfigs) {
     var s = App.StackService.find().findProperty('serviceName', this.get('content.serviceName'));
-    var dfd = $.Deferred();
     var defaultsProvider = s.get('defaultsProviders');
     var configsValidator = s.get('configsValidator');
-    if (!defaultsProvider) {
-      dfd.resolve();
-      return dfd.promise();
-    }
-    this.getInfoForDefaults(defaultsProvider);
-    this.addObserver('defaultsInfo.hosts.length', this, function () {
       var localDB = this.get('defaultsInfo');
       var recommendedDefaults = {};
       if (defaultsProvider) {
@@ -661,9 +655,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
       if (configsValidator) {
         configsValidator.set('recommendedDefaults', recommendedDefaults);
       }
-      dfd.resolve();
-    });
-    return dfd.promise();
   },
   /**
    * set isEditable property of config for admin
@@ -857,7 +848,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
     var configs = this.get('stepConfigs').findProperty('serviceName', this.get('content.serviceName')).get('configs');
 
     if (selectedConfigGroup.get('isDefault')) {
-      this.saveGlobalConfigs(configs);
       if (this.get('content.serviceName') === 'YARN' && !App.supports.capacitySchedulerUi) {
         configs = App.config.textareaIntoFileConfigs(configs, 'capacity-scheduler.xml');
       }
@@ -1132,11 +1122,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
       }
     });
     sites.forEach(function (site) {
-      if (site.type === 'global') {
-        site.properties = this.createGlobalSiteObj(site.tag, site.properties).properties;
-      } else {
-        site.properties = this.createSiteObj(site.type, site.tag, site.properties).properties;
-      }
+      site.properties = this.createSiteObj(site.type, site.tag, site.properties).properties;
     }, this);
     return sites;
   },
@@ -1166,158 +1152,134 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
     this.onDoPUTClusterConfigurations();
   },
   /**
-   * save new or change exist configs in global configs
+   * set hive hostnames in configs
    * @param configs
    */
-  saveGlobalConfigs: function (configs) {
-    var globalConfigs = this.get('globalConfigs');
-    configs.filterProperty('id', 'puppet var').forEach(function (uiConfigProperty) {
-      uiConfigProperty.set('value', App.config.trimProperty(uiConfigProperty));
-      if (globalConfigs.someProperty('name', uiConfigProperty.name)) {
-        var modelGlobalConfig = globalConfigs.findProperty('name', uiConfigProperty.name);
-        modelGlobalConfig.value = uiConfigProperty.value;
-      } else {
-        globalConfigs.pushObject({
-          name: uiConfigProperty.name,
-          value: uiConfigProperty.value
-        });
-      }
-    }, this);
-
-    this.setHiveHostName(globalConfigs);
-    this.setOozieHostName(globalConfigs);
-    this.set('globalConfigs', globalConfigs);
-  },
-
-  /**
-   * set hive hostnames in global configs
-   * @param globals
-   */
-  setHiveHostName: function (globals) {
-    if (globals.someProperty('name', 'hive_database')) {
-      var hiveDb = globals.findProperty('name', 'hive_database');
+  setHiveHostName: function (configs) {
+    if (configs.someProperty('name', 'hive_database')) {
+      var hiveDb = configs.findProperty('name', 'hive_database');
       if (hiveDb.value === 'New MySQL Database') {
-        var ambariHost = globals.findProperty('name', 'hive_ambari_host');
+        var ambariHost = configs.findProperty('name', 'hive_ambari_host');
         if (ambariHost) {
           ambariHost.name = 'hive_hostname';
         }
-        globals = globals.without(globals.findProperty('name', 'hive_existing_mysql_host'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_mysql_database'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_oracle_host'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_oracle_database'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_postgresql_host'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_postgresql_database'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_mysql_host'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_mysql_database'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_oracle_host'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_oracle_database'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_postgresql_host'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_postgresql_database'));
       } else if (hiveDb.value === 'Existing MySQL Database') {
-        var existingMySqlHost = globals.findProperty('name', 'hive_existing_mysql_host');
+        var existingMySqlHost = configs.findProperty('name', 'hive_existing_mysql_host');
         if (existingMySqlHost) {
           existingMySqlHost.name = 'hive_hostname';
         }
-        globals = globals.without(globals.findProperty('name', 'hive_ambari_host'));
-        globals = globals.without(globals.findProperty('name', 'hive_ambari_database'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_oracle_host'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_oracle_database'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_postgresql_host'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_postgresql_database'));
+        configs = configs.without(configs.findProperty('name', 'hive_ambari_host'));
+        configs = configs.without(configs.findProperty('name', 'hive_ambari_database'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_oracle_host'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_oracle_database'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_postgresql_host'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_postgresql_database'));
       } else if (hiveDb.value === Em.I18n.t('services.service.config.hive.oozie.postgresql')) {
-        var existingPostgreSqlHost = globals.findProperty('name', 'hive_existing_postgresql_host');
+        var existingPostgreSqlHost = configs.findProperty('name', 'hive_existing_postgresql_host');
         if (existingPostgreSqlHost) {
           existingPostgreSqlHost.name = 'hive_hostname';
         }
-        globals = globals.without(globals.findProperty('name', 'hive_ambari_host'));
-        globals = globals.without(globals.findProperty('name', 'hive_ambari_database'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_mysql_host'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_mysql_database'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_oracle_host'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_oracle_database'));
+        configs = configs.without(configs.findProperty('name', 'hive_ambari_host'));
+        configs = configs.without(configs.findProperty('name', 'hive_ambari_database'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_mysql_host'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_mysql_database'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_oracle_host'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_oracle_database'));
       }
       else { //existing oracle database
-        var existingOracleHost = globals.findProperty('name', 'hive_existing_oracle_host');
+        var existingOracleHost = configs.findProperty('name', 'hive_existing_oracle_host');
         if (existingOracleHost) {
           existingOracleHost.name = 'hive_hostname';
         }
-        globals = globals.without(globals.findProperty('name', 'hive_ambari_host'));
-        globals = globals.without(globals.findProperty('name', 'hive_ambari_database'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_mysql_host'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_mysql_database'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_postgresql_host'));
-        globals = globals.without(globals.findProperty('name', 'hive_existing_postgresql_database'));
+        configs = configs.without(configs.findProperty('name', 'hive_ambari_host'));
+        configs = configs.without(configs.findProperty('name', 'hive_ambari_database'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_mysql_host'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_mysql_database'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_postgresql_host'));
+        configs = configs.without(configs.findProperty('name', 'hive_existing_postgresql_database'));
       }
 
     }
   },
 
   /**
-   * set oozie hostnames in global configs
-   * @param globals
+   * set oozie hostnames in configs
+   * @param configs
    */
-  setOozieHostName: function (globals) {
+  setOozieHostName: function (configs) {
     var dbHostPropertyName = null;
-    if (globals.someProperty('name', 'oozie_database')) {
-      var oozieDb = globals.findProperty('name', 'oozie_database');
+    if (configs.someProperty('name', 'oozie_database')) {
+      var oozieDb = configs.findProperty('name', 'oozie_database');
       if (oozieDb.value === 'New Derby Database') {
-        globals = globals.without(globals.findProperty('name', 'oozie_ambari_host'));
-        globals = globals.without(globals.findProperty('name', 'oozie_ambari_database'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_mysql_host'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_mysql_database'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_oracle_host'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_oracle_database'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_postgresql_host'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_postgresql_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_ambari_host'));
+        configs = configs.without(configs.findProperty('name', 'oozie_ambari_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_mysql_host'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_mysql_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_oracle_host'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_oracle_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_postgresql_host'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_postgresql_database'));
       } else if (oozieDb.value === 'New MySQL Database') {
-        var ambariHost = globals.findProperty('name', 'oozie_ambari_host');
+        var ambariHost = configs.findProperty('name', 'oozie_ambari_host');
         if (ambariHost) {
           ambariHost.name = 'oozie_hostname';
         }
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_mysql_host'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_mysql_database'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_oracle_host'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_oracle_database'));
-        globals = globals.without(globals.findProperty('name', 'oozie_derby_database'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_postgresql_host'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_postgresql_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_mysql_host'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_mysql_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_oracle_host'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_oracle_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_derby_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_postgresql_host'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_postgresql_database'));
 
       } else if (oozieDb.value === 'Existing MySQL Database') {
-        var existingMySqlHost = globals.findProperty('name', 'oozie_existing_mysql_host');
+        var existingMySqlHost = configs.findProperty('name', 'oozie_existing_mysql_host');
         if (existingMySqlHost) {
           dbHostPropertyName = 'oozie_existing_mysql_host';
         }
-        globals = globals.without(globals.findProperty('name', 'oozie_ambari_host'));
-        globals = globals.without(globals.findProperty('name', 'oozie_ambari_database'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_oracle_host'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_oracle_database'));
-        globals = globals.without(globals.findProperty('name', 'oozie_derby_database'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_postgresql_host'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_postgresql_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_ambari_host'));
+        configs = configs.without(configs.findProperty('name', 'oozie_ambari_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_oracle_host'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_oracle_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_derby_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_postgresql_host'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_postgresql_database'));
       } else if (oozieDb.value === Em.I18n.t('services.service.config.hive.oozie.postgresql')) {
-        var existingPostgreSqlHost = globals.findProperty('name', 'oozie_existing_postgresql_host');
+        var existingPostgreSqlHost = configs.findProperty('name', 'oozie_existing_postgresql_host');
         if (existingPostgreSqlHost) {
           dbHostPropertyName = 'oozie_existing_postgresql_host';
         }
-        globals = globals.without(globals.findProperty('name', 'oozie_ambari_host'));
-        globals = globals.without(globals.findProperty('name', 'oozie_ambari_database'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_mysql_host'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_mysql_database'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_oracle_host'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_oracle_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_ambari_host'));
+        configs = configs.without(configs.findProperty('name', 'oozie_ambari_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_mysql_host'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_mysql_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_oracle_host'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_oracle_database'));
       }
       else { //existing oracle database
-        var existingOracleHost = globals.findProperty('name', 'oozie_existing_oracle_host');
+        var existingOracleHost = configs.findProperty('name', 'oozie_existing_oracle_host');
         if (existingOracleHost) {
           dbHostPropertyName = 'oozie_existing_oracle_host';
         }
-        globals = globals.without(globals.findProperty('name', 'oozie_ambari_host'));
-        globals = globals.without(globals.findProperty('name', 'oozie_ambari_database'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_mysql_host'));
-        globals = globals.without(globals.findProperty('name', 'oozie_existing_mysql_database'));
-        globals = globals.without(globals.findProperty('name', 'oozie_derby_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_ambari_host'));
+        configs = configs.without(configs.findProperty('name', 'oozie_ambari_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_mysql_host'));
+        configs = configs.without(configs.findProperty('name', 'oozie_existing_mysql_database'));
+        configs = configs.without(configs.findProperty('name', 'oozie_derby_database'));
       }
 
     }
 
     if (dbHostPropertyName) {
-      var oozieHostNameProperty = App.ServiceConfigProperty.create(App.config.get('preDefinedGlobalProperties').findProperty('name', 'oozie_hostname'));
-      oozieHostNameProperty.set('value', globals.findProperty('name', dbHostPropertyName).get('value'));
-      globals.pushObject(oozieHostNameProperty);
+      var oozieHostNameProperty = App.ServiceConfigProperty.create(App.config.get('preDefinedSiteProperties').findProperty('name', 'oozie_hostname'));
+      oozieHostNameProperty.set('value', configs.findProperty('name', dbHostPropertyName).get('value'));
+      configs.pushObject(oozieHostNameProperty);
     }
   },
 
@@ -1327,11 +1289,12 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
    */
   saveSiteConfigs: function (configs) {
     //storedConfigs contains custom configs as well
-    var serviceConfigProperties = configs.filterProperty('id', 'site property');
-    this.formatConfigValues(serviceConfigProperties);
+    this.setHiveHostName(configs);
+    this.setOozieHostName(configs);
+    this.formatConfigValues(configs);
     var mappedConfigs = App.config.excludeUnsupportedConfigs(this.get('configMapping').all(), App.Service.find().mapProperty('serviceName'));
     var allUiConfigs = this.loadUiSideConfigs(mappedConfigs);
-    this.set('uiConfigs', serviceConfigProperties.concat(allUiConfigs));
+    this.set('uiConfigs', configs.concat(allUiConfigs));
   },
 
   formatConfigValues: function (serviceConfigProperties) {
@@ -1381,7 +1344,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
   },
 
   /**
-   * return global config value
+   * return config value
    * @param templateName
    * @param expression
    * @return {Object}
@@ -1400,7 +1363,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
     if (express != null) {
       express.forEach(function (_express) {
         var index = parseInt(_express.match(/\[([\d]*)(?=\])/)[1]);
-        var globalObj = this.get('globalConfigs').findProperty('name', templateName[index]);
+        var globalObj = this.get('allConfigs').findProperty('name', templateName[index]);
         if (globalObj) {
           var globOverride = globalObj.overrides;
           if (globOverride != null) {
@@ -1475,9 +1438,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
     console.log("TRACE: Inside " + siteName);
     var configObject;
     switch (siteName) {
-      case 'global':
-        configObject = this.createGlobalSiteObj(tagName, this.get('globalConfigs'));
-        break;
       case 'core-site':
         if (this.get('content.serviceName') === 'HDFS' || this.get('content.serviceName') === 'GLUSTERFS') {
           configObject = this.createCoreSiteObj(tagName);
@@ -1674,37 +1634,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
   },
 
   /**
-   * create global site object
-   * @param {String} tagName
-   * @param {Array} globalConfigs array of config objects
-   * @return {{"type": String, "tag": String, "properties": Object}}
-   * @method createGlobalSiteObj
-   */
-  createGlobalSiteObj: function (tagName, globalConfigs) {
-    var heapsizeException = ['hadoop_heapsize', 'yarn_heapsize', 'nodemanager_heapsize', 'resourcemanager_heapsize', 'apptimelineserver_heapsize', 'jobhistory_heapsize'];
-    var globalSiteProperties = {};
-    globalConfigs.forEach(function (_globalSiteObj) {
-      // do not pass any globalConfigs whose name ends with _host or _hosts
-      if (_globalSiteObj.isRequiredByAgent !== false) {
-        // append "m" to JVM memory options except for hadoop_heapsize
-        if (/_heapsize|_newsize|_maxnewsize$/.test(_globalSiteObj.name) && !heapsizeException.contains(_globalSiteObj.name)) {
-          _globalSiteObj.value += "m";
-        }
-        globalSiteProperties[_globalSiteObj.name] = App.config.escapeXMLCharacters(_globalSiteObj.value);
-        //this.recordHostOverride(_globalSiteObj, 'global', tagName, this);
-        //console.log("TRACE: name of the global property is: " + _globalSiteObj.name);
-        //console.log("TRACE: value of the global property is: " + _globalSiteObj.value);
-      }
-    }, this);
-    var result = {"type": "global", "tag": tagName, "properties": globalSiteProperties};
-    var attributes = this.getConfigAttributes(globalConfigs);
-    if (attributes) {
-      result['properties_attributes'] = attributes;
-    }
-    return result;
-  },
-
-  /**
    * create core site object
    * @param tagName
    * @return {{"type": String, "tag": String, "properties": Object}}
@@ -1733,8 +1662,15 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
    * @return {Object}
    */
   createSiteObj: function (siteName, tagName, siteObj) {
+    var heapsizeException = ['hadoop_heapsize', 'yarn_heapsize', 'nodemanager_heapsize', 'resourcemanager_heapsize', 'apptimelineserver_heapsize', 'jobhistory_heapsize'];
     var siteProperties = {};
     siteObj.forEach(function (_siteObj) {
+      if (_siteObj.isRequiredByAgent !== false) {
+        if (/_heapsize|_newsize|_maxnewsize$/.test(_siteObj.name) && !heapsizeException.contains(_siteObj.name)) {
+          Em.set(_siteObj, "value",  _siteObj.value + "m");
+        }
+        siteProperties[_siteObj.name] = App.config.escapeXMLCharacters(_siteObj.value);
+      }
       switch (siteName) {
         case 'falcon-startup.properties':
         case 'falcon-runtime.properties':
@@ -1793,13 +1729,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
 
   hostComponentsmapping: [
     {
-      hostProperty: 'namenode_host',
-      componentName: 'NAMENODE',
-      serviceName: 'HDFS',
-      serviceUseThis: [],
-      m: true
-    },
-    {
       hostProperty: 'snamenode_host',
       componentName: 'SECONDARY_NAMENODE',
       serviceName: 'HDFS',
@@ -1902,12 +1831,12 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
   ],
 
   /**
-   * Adds host name of master component to global config;
+   * Adds host name of master component to config;
    * @method addHostNamesToGlobalConfig
    */
-  addHostNamesToGlobalConfig: function () {
+  addHostNamesToConfig: function () {
     var serviceName = this.get('content.serviceName');
-    var globalConfigs = this.get('globalConfigs');
+    var configs = this.get('allConfigs');
     //namenode_host is required to derive "fs.default.name" a property of core-site
     try {
       this.setHostForService('HDFS', 'NAMENODE', 'namenode_host', true);
@@ -1923,15 +1852,15 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
     }, this);
 
     if (serviceName === 'HIVE') {
-      var hiveDb = globalConfigs.findProperty('name', 'hive_database').value;
+      var hiveDb = configs.findProperty('name', 'hive_database').value;
       if (['Existing MySQL Database', 'Existing Oracle Database', 'Existing PostgreSQL Database'].contains(hiveDb)) {
-        globalConfigs.findProperty('name', 'hive_hostname').isVisible = true;
+        configs.findProperty('name', 'hive_hostname').isVisible = true;
       }
     }
     if (serviceName === 'OOZIE') {
-      var oozieDb = globalConfigs.findProperty('name', 'oozie_database').value;
+      var oozieDb = configs.findProperty('name', 'oozie_database').value;
       if (['Existing MySQL Database', 'Existing Oracle Database', 'Existing PostgreSQL Database'].contains(oozieDb)) {
-        globalConfigs.findProperty('name', 'oozie_hostname').isVisible = true;
+        configs.findProperty('name', 'oozie_hostname').isVisible = true;
       }
     }
   },
@@ -1944,12 +1873,12 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
    * @method setHostForService
    */
   setHostForService: function (serviceName, componentName, hostProperty, multiple) {
-    var globalConfigs = this.get('globalConfigs');
+    var configs = this.get('allConfigs');
     var serviceConfigs = this.get('serviceConfigs').findProperty('serviceName', serviceName).get('configs');
     var hostConfig = serviceConfigs.findProperty('name', hostProperty);
     if (hostConfig) {
       hostConfig.defaultValue = this.getMasterComponentHostValue(componentName, multiple);
-      globalConfigs.push(hostConfig);
+      configs.push(hostConfig);
     }
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6244c49b/ambari-web/app/controllers/main/service/reassign_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign_controller.js b/ambari-web/app/controllers/main/service/reassign_controller.js
index 0852345..db39b6a 100644
--- a/ambari-web/app/controllers/main/service/reassign_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign_controller.js
@@ -102,8 +102,8 @@ App.ReassignMasterController = App.WizardController.extend({
 
   getSecurityStatusSuccessCallback: function (data) {
     var configs = data.Clusters.desired_configs;
-    if ('global' in configs) {
-      this.getServiceConfigsFromServer(configs['global'].tag);
+    if ('hadoop-env' in configs) {
+      this.getServiceConfigsFromServer(configs['hadoop-env'].tag);
     }
     else {
       console.error('Cannot get security status from server');
@@ -113,7 +113,7 @@ App.ReassignMasterController = App.WizardController.extend({
   getServiceConfigsFromServer: function (tag) {
     var tags = [
       {
-        siteName: "global",
+        siteName: "hadoop-env",
         tagName: tag
       }
     ];

http://git-wip-us.apache.org/repos/asf/ambari/blob/6244c49b/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 3aa1190..1c4debc 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -647,7 +647,6 @@ App.WizardStep7Controller = Em.Controller.extend({
       return;
     }
     this.clearStep();
-    App.config.setPreDefinedGlobalProperties();
     App.config.setPreDefinedServiceConfigs();
 
     //STEP 1: Load advanced configs

http://git-wip-us.apache.org/repos/asf/ambari/blob/6244c49b/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 cf16a6e..8545c01 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -68,11 +68,6 @@ App.WizardStep8Controller = Em.Controller.extend({
   configs: [],
 
   /**
-   * @type {Object[]}
-   */
-  globals: [],
-
-  /**
    * All configs
    * @type {Array}
    */
@@ -131,28 +126,6 @@ App.WizardStep8Controller = Em.Controller.extend({
   }.property('App.router.mainAdminSecurityController.securityEnabled'),
 
   /**
-   * During page save time, we set the host overrides to the server.
-   * The new host -> site:tag map is stored below. This will be
-   * useful during save, to update the host's host components. Also,
-   * it will be useful in deletion of overrides.
-   *
-   * Example:
-   * {
-   *  'hostname1': {
-   *    'global': {
-   *      'tagName': 'tag3187261938_hostname1',
-   *      'map': {
-   *        'hadoop_heapsize': '2048m'
-   *      }
-   *    }
-   *  }
-   * }
-   *
-   * @see loadedHostToOverrideSiteToTagMap
-   */
-  savedHostToOverrideSiteToTagMap: {},
-
-  /**
    * Selected config group
    * @type {Object}
    */
@@ -207,7 +180,6 @@ App.WizardStep8Controller = Em.Controller.extend({
   clearStep: function () {
     this.get('services').clear();
     this.get('configs').clear();
-    this.get('globals').clear();
     this.get('clusterInfo').clear();
     this.get('serviceConfigTags').clear();
     this.set('servicesInstalled', false);
@@ -228,7 +200,6 @@ App.WizardStep8Controller = Em.Controller.extend({
     this.clearStep();
     if (this.get('content.serviceConfigProperties')) {
       this.formatProperties();
-      this.loadGlobals();
       this.loadConfigs();
     }
     this.loadClusterInfo();
@@ -248,39 +219,20 @@ App.WizardStep8Controller = Em.Controller.extend({
   },
 
   /**
-   * Load global configs and remove some of them:
-   * <ul>
-   *   <li>Unused DB properties for Hive</li>
-   *   <li>Unused DB properties for Oozie</li>
-   * <ul>
-   * @method loadGlobals
-   */
-  loadGlobals: function () {
-    var globals = this.get('content.serviceConfigProperties').filterProperty('id', 'puppet var');
-    if (globals.someProperty('name', 'hive_database')) {
-      globals = this.removeHiveConfigs(globals);
-    }
-    if (globals.someProperty('name', 'oozie_database')) {
-      globals = this.removeOozieConfigs(globals);
-    }
-    this.set('globals', globals);
-  },
-
-  /**
    * Remove unused Hive configs
-   * @param {Ember.Enumerable} globals
+   * @param {Ember.Enumerable} configs
    * @returns {Ember.Enumerable}
    * @method removeHiveConfigs
    */
-  removeHiveConfigs: function (globals) {
-    var hiveDb = globals.findProperty('name', 'hive_database');
+  removeHiveConfigs: function (configs) {
+    var hiveDb = configs.findProperty('name', 'hive_database');
     var hiveDbType = {name: 'hive_database_type', value: 'mysql'};
 
     var hive_properties = Em.A([]);
 
     if (hiveDb.value === 'New MySQL Database') {
-      if (globals.someProperty('name', 'hive_ambari_host')) {
-        globals.findProperty('name', 'hive_hostname').value = globals.findProperty('name', 'hive_ambari_host').value;
+      if (configs.someProperty('name', 'hive_ambari_host')) {
+        configs.findProperty('name', 'hive_hostname').value = configs.findProperty('name', 'hive_ambari_host').value;
         hiveDbType.value = 'mysql';
       }
       hive_properties = Em.A(['hive_existing_mysql_host', 'hive_existing_mysql_database', 'hive_existing_oracle_host',
@@ -288,20 +240,20 @@ App.WizardStep8Controller = Em.Controller.extend({
     }
     else {
       if (hiveDb.value === 'Existing MySQL Database') {
-        globals.findProperty('name', 'hive_hostname').value = globals.findProperty('name', 'hive_existing_mysql_host').value;
+        configs.findProperty('name', 'hive_hostname').value = configs.findProperty('name', 'hive_existing_mysql_host').value;
         hiveDbType.value = 'mysql';
         hive_properties = Em.A(['hive_ambari_host', 'hive_ambari_database', 'hive_existing_oracle_host',
           'hive_existing_oracle_database', 'hive_existing_postgresql_host', 'hive_existing_postgresql_database']);
       }
       else {
         if (hiveDb.value === Em.I18n.t('services.service.config.hive.oozie.postgresql')) {
-          globals.findProperty('name', 'hive_hostname').value = globals.findProperty('name', 'hive_existing_postgresql_host').value;
+          configs.findProperty('name', 'hive_hostname').value = configs.findProperty('name', 'hive_existing_postgresql_host').value;
           hiveDbType.value = 'postgres';
           hive_properties = Em.A(['hive_ambari_host', 'hive_ambari_database', 'hive_existing_oracle_host',
             'hive_existing_oracle_database', 'hive_existing_mysql_host', 'hive_existing_mysql_database']);
         }
         else { //existing oracle database
-          globals.findProperty('name', 'hive_hostname').value = globals.findProperty('name', 'hive_existing_oracle_host').value;
+          configs.findProperty('name', 'hive_hostname').value = configs.findProperty('name', 'hive_existing_oracle_host').value;
           hiveDbType.value = 'oracle';
           hive_properties = Em.A(['hive_ambari_host', 'hive_ambari_database', 'hive_existing_mysql_host',
             'hive_existing_mysql_database', 'hive_existing_postgresql_host', 'hive_existing_postgresql_database']);
@@ -310,27 +262,27 @@ App.WizardStep8Controller = Em.Controller.extend({
     }
 
     hive_properties.forEach(function (property) {
-      globals = globals.without(globals.findProperty('name', property));
+      configs = configs.without(configs.findProperty('name', property));
     });
 
-    globals.pushObject(hiveDbType);
-    return globals;
+    configs.pushObject(hiveDbType);
+    return configs;
   },
 
   /**
    * Remove unused Oozie configs
-   * @param {Ember.Enumerable} globals
+   * @param {Ember.Enumerable} configs
    * @returns {Ember.Enumerable}
    * @method removeOozieConfigs
    */
-  removeOozieConfigs: function (globals) {
-    var oozieDb = globals.findProperty('name', 'oozie_database');
+  removeOozieConfigs: function (configs) {
+    var oozieDb = configs.findProperty('name', 'oozie_database');
     var oozieDbType = {name: 'oozie_database_type'};
 
     var oozie_properties = Em.A(['oozie_ambari_host', 'oozie_ambari_database']);
 
     if (oozieDb.value === 'New Derby Database') {
-      globals.findProperty('name', 'oozie_hostname').value = globals.findProperty('name', 'oozie_ambari_host').value;
+      configs.findProperty('name', 'oozie_hostname').value = configs.findProperty('name', 'oozie_ambari_host').value;
       oozieDbType.value = 'derby';
       oozie_properties = Em.A(['oozie_ambari_host', 'oozie_ambari_database', 'oozie_existing_mysql_host',
         'oozie_existing_mysql_database', 'oozie_existing_oracle_host', 'oozie_existing_oracle_database',
@@ -338,20 +290,20 @@ App.WizardStep8Controller = Em.Controller.extend({
     }
     else {
       if (oozieDb.value === 'Existing MySQL Database') {
-        globals.findProperty('name', 'oozie_hostname').value = globals.findProperty('name', 'oozie_existing_mysql_host').value;
+        configs.findProperty('name', 'oozie_hostname').value = configs.findProperty('name', 'oozie_existing_mysql_host').value;
         oozieDbType.value = 'mysql';
         oozie_properties = Em.A(['oozie_ambari_host', 'oozie_ambari_database', 'oozie_existing_oracle_host',
           'oozie_existing_oracle_database', 'oozie_derby_database', 'oozie_existing_postgresql_host', 'oozie_existing_postgresql_database']);
       }
       else {
         if (oozieDb.value === Em.I18n.t('services.service.config.hive.oozie.postgresql')) {
-          globals.findProperty('name', 'oozie_hostname').value = globals.findProperty('name', 'oozie_existing_postgresql_host').value;
+          configs.findProperty('name', 'oozie_hostname').value = configs.findProperty('name', 'oozie_existing_postgresql_host').value;
           oozieDbType.value = 'postgresql';
           oozie_properties = Em.A(['oozie_ambari_host', 'oozie_ambari_database', 'oozie_existing_oracle_host',
             'oozie_existing_oracle_database', 'oozie_existing_mysql_host', 'oozie_existing_mysql_database']);
         }
         else { // existing oracle database
-          globals.findProperty('name', 'oozie_hostname').value = globals.findProperty('name', 'oozie_existing_oracle_host').value;
+          configs.findProperty('name', 'oozie_hostname').value = configs.findProperty('name', 'oozie_existing_oracle_host').value;
           oozieDbType.value = 'oracle';
           oozie_properties = Em.A(['oozie_ambari_host', 'oozie_ambari_database', 'oozie_existing_mysql_host',
             'oozie_existing_mysql_database', 'oozie_derby_database', 'oozie_existing_postgresql_host', 'oozie_existing_postgresql_database']);
@@ -359,10 +311,10 @@ App.WizardStep8Controller = Em.Controller.extend({
       }
     }
     oozie_properties.forEach(function (property) {
-      globals = globals.without(globals.findProperty('name', property));
+      configs = configs.without(configs.findProperty('name', property));
     });
-    globals.pushObject(oozieDbType);
-    return globals;
+    configs.pushObject(oozieDbType);
+    return configs;
   },
 
   /**
@@ -371,13 +323,19 @@ App.WizardStep8Controller = Em.Controller.extend({
    */
   loadConfigs: function () {
     //storedConfigs contains custom configs as well
-    var serviceConfigProperties = this.get('content.serviceConfigProperties').filterProperty('id', 'site property');
-    serviceConfigProperties.forEach(function (_config) {
+    var configs = this.get('content.serviceConfigProperties');
+    if (configs.someProperty('name', 'hive_database')) {
+      configs = this.removeHiveConfigs(configs);
+    }
+    if (configs.someProperty('name', 'oozie_database')) {
+      configs = this.removeOozieConfigs(configs);
+    }
+    configs.forEach(function (_config) {
       _config.value = (typeof _config.value === "boolean") ? _config.value.toString() : _config.value;
     });
     var mappedConfigs = App.config.excludeUnsupportedConfigs(this.get('configMapping'), this.get('selectedServices').mapProperty('serviceName'));
     var uiConfigs = this.loadUiSideConfigs(mappedConfigs);
-    this.set('configs', serviceConfigProperties.concat(uiConfigs));
+    this.set('configs', configs.concat(uiConfigs));
   },
 
   /**
@@ -402,7 +360,7 @@ App.WizardStep8Controller = Em.Controller.extend({
     }, this);
     var dependentConfig = $.extend(true, [], configMapping.filterProperty('foreignKey'));
     dependentConfig.forEach(function (_config) {
-      App.config.setConfigValue(uiConfig, this.get('content.serviceConfigProperties'), _config, this.get('globals'));
+      App.config.setConfigValue(uiConfig, this.get('content.serviceConfigProperties'), _config);
       uiConfig.pushObject({
         "id": "site property",
         "name": _config._name || _config.name,
@@ -482,9 +440,9 @@ App.WizardStep8Controller = Em.Controller.extend({
     express.forEach(function (_express) {
       //console.log("The value of template is: " + _express);
       var index = parseInt(_express.match(/\[([\d]*)(?=\])/)[1]);
-      if (this.get('globals').someProperty('name', templateName[index])) {
+      if (this.get('configs').someProperty('name', templateName[index])) {
         //console.log("The name of the variable is: " + this.get('content.serviceConfigProperties').findProperty('name', templateName[index]).name);
-        var globalObj = this.get('globals').findProperty('name', templateName[index]);
+        var globalObj = this.get('configs').findProperty('name', templateName[index]);
         var globValue = globalObj.value;
         // Hack for templeton.zookeeper.hosts
         var preReplaceValue = null;
@@ -876,7 +834,7 @@ App.WizardStep8Controller = Em.Controller.extend({
   updateConfigurations: function (configsToUpdate) {
     var configurationController = App.router.get('mainServiceInfoConfigsController');
     var configs = configsToUpdate.filter(function(config) {
-      return !!config.filename && !/^(global|core)/.test(config.filename);
+      return !!config.filename && !/^(core)/.test(config.filename) && config.filename.indexOf('env')==-1;
     });
     var serviceNames = configs.mapProperty('serviceName').uniq();
     var configsMap = [];
@@ -1419,54 +1377,81 @@ App.WizardStep8Controller = Em.Controller.extend({
       this.get('serviceConfigTags').pushObject(this.createSiteObj('hdfs-site', false, tag));
       this.get('serviceConfigTags').pushObject(this.createLog4jObj('hdfs', tag));
     }
-    var globalSiteObj = this.createGlobalSiteObj(tag);
     if (this.get('content.controllerName') == 'addServiceController') {
       tag = 'version' + (new Date).getTime();
-      globalSiteObj.tag = tag;
       coreSiteObject.tag = tag;
       this.get('serviceConfigTags').pushObject(coreSiteObject);
+      //for Add Service save config of new and installed services either
+      selectedServices = selectedServices.concat(this.get('installedServices'));
     }
-    this.get('serviceConfigTags').pushObject(globalSiteObj);
 
     var objMap = {
+      HDFS: {site: [
+        {filename: 'hdfs-site', isXmlFile: true},
+        {filename: 'hadoop-env', isXmlFile: true}
+      ], log4j: ['hdfs']},
+      GANGLIA: {site: [
+        {filename: 'ganglia-env', isXmlFile: true}
+      ], log4j: []},
+      NAGIOS: {site: [
+        {filename: 'nagios-env', isXmlFile: true}
+      ], log4j: []},
+      STORM: {site: [
+        {filename: 'storm-env', isXmlFile: true}
+      ], log4j: []},
       MAPREDUCE: {site: [
-        {filename: 'mapred-site', isXmlFile: true}
+        {filename: 'mapred-site', isXmlFile: true},
+        {filename: 'mapred-env', isXmlFile: true}
       ], log4j: ['mapreduce']},
       MAPREDUCE2: {site: [
-        {filename: 'mapred-site', isXmlFile: true}
+        {filename: 'mapred-site', isXmlFile: true},
+        {filename: 'mapred-env', isXmlFile: true}
       ], log4j: ['mapreduce2']},
       YARN: {site: [
         {filename: 'yarn-site', isXmlFile: true},
-        {filename: 'capacity-scheduler', isXmlFile: true}
+        {filename: 'capacity-scheduler', isXmlFile: true},
+        {filename: 'yarn-env', isXmlFile: true}
       ], log4j: ['yarn']},
       HBASE: {site: [
-        {filename: 'hbase-site', isXmlFile: true}
+        {filename: 'hbase-site', isXmlFile: true},
+        {filename: 'hbase-env', isXmlFile: true}
       ], log4j: ['hbase']},
       OOZIE: {site: [
-        {filename: 'oozie-site', isXmlFile: true}
+        {filename: 'oozie-site', isXmlFile: true},
+        {filename: 'oozie-env', isXmlFile: true}
       ], log4j: ['oozie']},
       HIVE: {site: [
-        {filename: 'hive-site', isXmlFile: true}
+        {filename: 'hive-site', isXmlFile: true},
+        {filename: 'hive-env', isXmlFile: true}
       ], log4j: ['hive', 'hive-exec']},
       WEBHCAT: {site: [
-        {filename: 'webhcat-site', isXmlFile: true}
+        {filename: 'webhcat-site', isXmlFile: true},
+        {filename: 'webhcat-env', isXmlFile: true}
       ], log4j: []},
       HUE: {site: [
-        {filename: 'hue-site', isXmlFile: true}
+        {filename: 'hue-site', isXmlFile: true},
+        {filename: 'hue-env', isXmlFile: true}
       ], log4j: []},
       PIG: {site: [
-        {filename: 'pig-properties', isXmlFile: false}
+        {filename: 'pig-properties', isXmlFile: false},
+        {filename: 'pig-env', isXmlFile: true}
       ], log4j: ['pig']},
       FALCON: {site: [
         {filename: 'falcon-startup.properties', isXmlFile: false},
-        {filename: 'falcon-runtime.properties', isXmlFile: false}
+        {filename: 'falcon-runtime.properties', isXmlFile: false},
+        {filename: 'falcon-env', isXmlFile: true}
       ], log4j: []},
       TEZ: {site: [
-        {filename: 'tez-site', isXmlFile: true}
+        {filename: 'tez-site', isXmlFile: true},
+        {filename: 'tez-env', isXmlFile: true}
       ], log4j: []},
-      ZOOKEEPER: {site: [], log4j: ['zookeeper']},
+      SQOOP: {site: [
+        {filename: 'sqoop-env', isXmlFile: true}
+      ], log4j: []},
+      ZOOKEEPER: {site: [{filename: 'zookeeper-env', isXmlFile: true}], log4j: ['zookeeper']},
       FLUME: {site: [
-        {filename: 'flume-conf', isXmlFile: false}
+        {filename: 'flume-conf', isXmlFile: false},
+        {filename: 'flume-env', isXmlFile: true}
       ], log4j: []}
     };
 
@@ -1620,40 +1605,6 @@ App.WizardStep8Controller = Em.Controller.extend({
   },
 
   /**
-   * Create Global Site object
-   * @returns {{type: string, tag: string, properties: {}}}
-   * @method createGlobalSiteObj
-   */
-  createGlobalSiteObj: function (tag) {
-    var globalSiteProperties = {};
-    var globalSiteObj = this.get('globals');
-    var isGLUSTERFSSelected = this.get('selectedServices').someProperty('serviceName', 'GLUSTERFS');
-
-    // screen out the GLUSTERFS-specific global config entries when they are not required
-    if (!isGLUSTERFSSelected) {
-      globalSiteObj = globalSiteObj.filter(function (_config) {
-        return !_config.name.contains("fs_glusterfs");
-      });
-    }
-
-    globalSiteObj.forEach(function (globalConfig) {
-      var heapsizeExceptions = ['hadoop_heapsize', 'yarn_heapsize', 'nodemanager_heapsize', 'resourcemanager_heapsize', 'apptimelineserver_heapsize', 'jobhistory_heapsize'];
-      // do not pass any globals whose name ends with _host or _hosts
-      if (globalConfig.isRequiredByAgent !== false) {
-        // append "m" to JVM memory options except for heapsizeExtensions
-        if (/_heapsize|_newsize|_maxnewsize$/.test(globalConfig.name) && !heapsizeExceptions.contains(globalConfig.name)) {
-          globalSiteProperties[globalConfig.name] = globalConfig.value + "m";
-        } else {
-          globalSiteProperties[globalConfig.name] = App.config.escapeXMLCharacters(globalConfig.value);
-        }
-      }
-    }, this);
-    // we don't expose gmond_user to the user; it needs to be the same as gmetad_user
-    globalSiteProperties['gmond_user'] = globalSiteProperties['gmetad_user'];
-    return {"type": "global", "tag": tag, "properties": globalSiteProperties};
-  },
-
-  /**
    * Create Core Site object
    * @returns {{type: string, tag: string, properties: {}}}
    * @method createCoreSiteObj
@@ -1666,11 +1617,11 @@ App.WizardStep8Controller = Em.Controller.extend({
       coreSiteProperties = {},
     // some configs needs to be skipped if services are not selected
       isOozieSelected = installedAndSelectedServices.someProperty('serviceName', 'OOZIE'),
-      oozieUser = this.get('globals').someProperty('name', 'oozie_user') ? this.get('globals').findProperty('name', 'oozie_user').value : null,
+      oozieUser = this.get('configs').someProperty('name', 'oozie_user') ? this.get('configs').findProperty('name', 'oozie_user').value : null,
       isHiveSelected = installedAndSelectedServices.someProperty('serviceName', 'HIVE'),
-      hiveUser = this.get('globals').someProperty('name', 'hive_user') ? this.get('globals').findProperty('name', 'hive_user').value : null,
+      hiveUser = this.get('configs').someProperty('name', 'hive_user') ? this.get('configs').findProperty('name', 'hive_user').value : null,
       isHcatSelected = installedAndSelectedServices.someProperty('serviceName', 'WEBHCAT'),
-      hcatUser = this.get('globals').someProperty('name', 'hcat_user') ? this.get('globals').findProperty('name', 'hcat_user').value : null,
+      hcatUser = this.get('configs').someProperty('name', 'hcat_user') ? this.get('configs').findProperty('name', 'hcat_user').value : null,
       isGLUSTERFSSelected = installedAndSelectedServices.someProperty('serviceName', 'GLUSTERFS');
 
     // screen out the GLUSTERFS-specific core-site.xml entries when they are not needed
@@ -1690,13 +1641,13 @@ App.WizardStep8Controller = Em.Controller.extend({
       }
       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;
+          this.get('configs').someProperty('name', 'fs_glusterfs_default_name') ?
+            App.config.escapeXMLCharacters(this.get('configs').findProperty('name', 'fs_glusterfs_default_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;
+          this.get('configs').someProperty('name', 'glusterfs_defaultFS_name') ?
+            App.config.escapeXMLCharacters(this.get('configs').findProperty('name', 'glusterfs_defaultFS_name').value) : null;
       }
     }, this);
     return {"type": "core-site", "tag": "version1", "properties": coreSiteProperties};
@@ -1718,7 +1669,16 @@ App.WizardStep8Controller = Em.Controller.extend({
       }, this);
     } else {
       this.get('configs').filterProperty('filename', site + '.xml').forEach(function (_configProperty) {
-        properties[_configProperty.name] = App.config.escapeXMLCharacters(_configProperty.value);
+        var heapsizeExceptions = ['hadoop_heapsize', 'yarn_heapsize', 'nodemanager_heapsize', 'resourcemanager_heapsize', 'apptimelineserver_heapsize', 'jobhistory_heapsize'];
+        // do not pass any globals whose name ends with _host or _hosts
+        if (_configProperty.isRequiredByAgent !== false) {
+          // append "m" to JVM memory options except for heapsizeExtensions
+          if (/_heapsize|_newsize|_maxnewsize$/.test(_configProperty.name) && !heapsizeExceptions.contains(_configProperty.name)) {
+            properties[_configProperty.name] = _configProperty.value + "m";
+          } else {
+            properties[_configProperty.name] = App.config.escapeXMLCharacters(_configProperty.value);
+           }
+        }
       }, this);
     }
     return {"type": site, "tag": tag, "properties": properties };