ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject git commit: AMBARI-7829 Properties are present in Hive/Configs/Advanced hive-site, but not available on backend. (ababiichuk)
Date Fri, 17 Oct 2014 11:54:13 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 4abb993ee -> 48fc35074


AMBARI-7829 Properties are present in Hive/Configs/Advanced hive-site, but not available on
backend. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 48fc3507444b86fee5cc0e29d3f3a2763c98e319
Parents: 4abb993
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Fri Oct 17 14:37:22 2014 +0300
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Fri Oct 17 14:37:22 2014 +0300

----------------------------------------------------------------------
 .../controllers/main/service/info/configs.js    | 36 +++++++++-----------
 ambari-web/app/utils/config.js                  | 12 +++----
 2 files changed, 23 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/48fc3507/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 79c11b0..3b933b9 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -82,7 +82,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
   }.property('App.isHadoop2Stack'),
 
   showConfigHistoryFeature: function() {
-    return App.supports.configHistory;
+    return App.get('supports.configHistory');
   }.property('App.supports.configHistory'),
   /**
    * Map, which contains relation between group and site
@@ -453,7 +453,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
     var defaultHosts = App.get('allHostNames');
 
     //parse loaded config groups
-    if (App.supports.hostOverrides) {
+    if (App.get('supports.hostOverrides')) {
       var configGroups = [];
       if (data && data.config_groups && data.config_groups.length) {
         data.config_groups.forEach(function (item) {
@@ -517,7 +517,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
     var selectedConfigGroup = this.get('selectedConfigGroup');
     var serviceName = this.get('content.serviceName');
     //STEP 1: handle tags from JSON data for host overrides
-    if (!App.supports.configHistory) {
+    if (!App.get('supports.configHistory')) {
       //if config history enabled then loadedGroupToOverrideSiteToTagMap already has content
set in loadSelectedVersionSuccess()
       this.loadedGroupToOverrideSiteToTagMap = {};
     }
@@ -538,25 +538,23 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
     var advancedConfigs = this.get('advancedConfigs');
     //STEP 4: Load on-site config by service from server
     App.router.get('configurationController').getConfigsByTags(this.get('serviceConfigTags')).done(function(configGroups){
-      //STEP 5: Merge on-site configs with pre-defined
+      //Merge on-site configs with pre-defined
       var configSet = App.config.mergePreDefinedWithLoaded(configGroups, advancedConfigs,
self.get('serviceConfigTags'), serviceName);
       configSet = App.config.syncOrderWithPredefined(configSet);
-      //var serviceConfigs = this.getSitesConfigProperties(advancedConfigs);
+
       var configs = configSet.configs;
-      //STEP 6: add advanced configs
-      App.config.addAdvancedConfigs(configs, advancedConfigs, serviceName);
-      //STEP 7: add custom configs
+      //add custom configs
       App.config.addCustomConfigs(configs);
       //put properties from capacity-scheduler.xml into one config with textarea view
-      if (self.get('content.serviceName') === 'YARN' && !App.supports.capacitySchedulerUi)
{
+      if (self.get('content.serviceName') === 'YARN' && !App.get('supports.capacitySchedulerUi'))
{
         configs = App.config.fileConfigsIntoTextarea(configs, 'capacity-scheduler.xml');
       }
       self.set('allConfigs', configs);
-      //STEP 8: add configs as names of host components
+      //add configs as names of host components
       self.addHostNamesToConfig();
-      //STEP load configs of version being compared against
+      //load configs of version being compared against
       self.loadCompareVersionConfigs(self.get('allConfigs')).done(function (isComparison)
{
-        //STEP 9: Load and add overriden configs of group
+        //Load and add overriden configs of group
         if (!isComparison && (!self.get('selectedConfigGroup').get('isDefault') ||
self.get('isCurrentSelected'))) {
           App.config.loadServiceConfigGroupOverrides(self.get('allConfigs'), self.get('loadedGroupToOverrideSiteToTagMap'),
self.get('configGroups'), self.onLoadOverrides, self);
         } else {
@@ -847,7 +845,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
       App.config.OnNnHAHideSnn(serviceConfig);
     }
 
-    if (serviceName && !App.supports.serverRecommendValidate) {
+    if (serviceName && !App.get('supports.serverRecommendValidate')) {
       // set recommended Defaults first then load the configs (including set validator)
       var s = App.StackService.find().findProperty('serviceName', this.get('content.serviceName'));
       var defaultsProvider = s.get('defaultsProviders');
@@ -857,7 +855,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
         Em.run(this, 'setDefaults');
       }
     } else {
-      if (App.supports.serverRecommendValidate) {
+      if (App.get('supports.serverRecommendValidate')) {
         serviceConfig = App.config.createServiceConfig(this.get('content.serviceName'));
         this.loadConfigs(this.get('allConfigs'), serviceConfig);
         this.checkOverrideProperty(serviceConfig);
@@ -1230,7 +1228,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
     newSCP.set('supportsFinal', serviceConfigProperty.get('supportsFinal'));
     newSCP.set('isOriginalSCP', false); // indicated this is overridden value,
     newSCP.set('parentSCP', serviceConfigProperty);
-    if (App.supports.hostOverrides && defaultGroupSelected) {
+    if (App.get('supports.hostOverrides') && defaultGroupSelected) {
       newSCP.set('group', override.group);
       newSCP.set('isEditable', false);
     }
@@ -1270,7 +1268,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
       displayName = this.get('content.displayName'),
       urlParams = '';
 
-    if (App.supports.hostOverrides ||
+    if (App.get('supports.hostOverrides') ||
       (serviceName !== 'HDFS' && this.get('content.isStopped') === true) ||
       ((serviceName === 'HDFS') && this.get('content.isStopped') === true &&
(!App.Service.find().someProperty('id', 'MAPREDUCE') || App.Service.find('MAPREDUCE').get('isStopped'))))
{
 
@@ -1344,7 +1342,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
     var self = this;
 
     if (selectedConfigGroup.get('isDefault')) {
-      if (this.get('content.serviceName') === 'YARN' && !App.supports.capacitySchedulerUi)
{
+      if (this.get('content.serviceName') === 'YARN' && !App.get('supports.capacitySchedulerUi'))
{
         configs = App.config.textareaIntoFileConfigs(configs, 'capacity-scheduler.xml');
       }
       var modifiedConfigs = configs
@@ -1958,7 +1956,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
         break;
       default:
         var filename = (App.config.get('filenameExceptions').contains(siteName)) ? siteName
: siteName + '.xml';
-        if (filename === 'mapred-queue-acls.xml' && !App.supports.capacitySchedulerUi)
{
+        if (filename === 'mapred-queue-acls.xml' && !App.get('supports.capacitySchedulerUi'))
{
           return null;
         }
         configObject = this.createSiteObj(siteName, tagName, this.get('uiConfigs').filterProperty('filename',
filename));
@@ -2700,7 +2698,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
     }
     //clean when switch config group
     this.loadedGroupToOverrideSiteToTagMap = {};
-    if (App.supports.configHistory) {
+    if (App.get('supports.configHistory')) {
       var configGroupVersions = App.ServiceConfigVersion.find().filterProperty('groupId',
event.context.get('id'));
       //check whether config group has config versions
       if (configGroupVersions.length > 0) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/48fc3507/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index cd5b094..75eda91 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -164,7 +164,7 @@ App.config = Em.Object.create({
   //configs with these filenames go to appropriate category not in Advanced
   customFileNames: function () {
     var customFiles = ['flume-conf.xml'];
-    if (App.supports.capacitySchedulerUi) {
+    if (App.get('supports.capacitySchedulerUi')) {
       if (App.get('isHadoop2Stack')) {
         return customFiles.concat(['capacity-scheduler.xml']);
       }
@@ -628,7 +628,7 @@ App.config = Em.Object.create({
     var stored = configs.filter(function (_config) {
       return this.get('categoriesWithCustom').contains(_config.category);
     }, this);
-    if (App.supports.capacitySchedulerUi) {
+    if (App.get('supports.capacitySchedulerUi')) {
       var queueProperties = stored.filter(this.get('capacitySchedulerFilter'));
       if (queueProperties.length) {
         queueProperties.setEach('isQueue', true);
@@ -811,7 +811,7 @@ App.config = Em.Object.create({
     serviceConfig.configCategories.filterProperty('isCustomView', true).forEach(function
(category) {
       switch (category.name) {
         case 'CapacityScheduler':
-          if (App.supports.capacitySchedulerUi) {
+          if (App.get('supports.capacitySchedulerUi')) {
             category.set('customView', App.ServiceConfigCapacityScheduler);
           } else {
             category.set('isCustomView', false);
@@ -926,8 +926,8 @@ App.config = Em.Object.create({
          * Properties from capacity-scheduler.xml are ignored unless HDP stack version is
2.x or
          * HDP stack version is 1.x and App.supports.capacitySchedulerUi is true.
          */
-        if ((fileName !== 'mapred-queue-acls.xml' || App.supports.capacitySchedulerUi) &&
-          (fileName !== 'capacity-scheduler.xml' || isHDP2 || App.supports.capacitySchedulerUi))
{
+        if ((fileName !== 'mapred-queue-acls.xml' || App.get('supports.capacitySchedulerUi'))
&&
+          (fileName !== 'capacity-scheduler.xml' || isHDP2 || App.get('supports.capacitySchedulerUi')))
{
           var property = {
             serviceName: serviceName,
             name: item.property_name,
@@ -1363,7 +1363,7 @@ App.config = Em.Object.create({
   persistWizardStep7ConfigGroups: function () {
     var installerController = App.router.get('installerController');
     var step7Controller = App.router.get('wizardStep7Controller');
-    if (App.supports.hostOverridesInstaller) {
+    if (App.get('supports.hostOverridesInstaller')) {
       installerController.saveServiceConfigGroups(step7Controller, step7Controller.get('content.controllerName')
== 'addServiceController');
       App.clusterStatus.setClusterStatus({
         localdb: App.db.data


Mime
View raw message