ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject ambari git commit: AMBARI-11069 Kafka config "port" is deprecated but still shows up in the UI config page. (ababiichuk)
Date Tue, 12 May 2015 15:49:39 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 294268060 -> df513801b


AMBARI-11069 Kafka config "port" is deprecated but still shows up in the UI config page. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: df513801b3de4ee7901d2891a53dba4c80f0eafa
Parents: 2942680
Author: aBabiichuk <ababiichuk@hortonworks.com>
Authored: Tue May 12 18:39:58 2015 +0300
Committer: aBabiichuk <ababiichuk@hortonworks.com>
Committed: Tue May 12 18:49:21 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/data/BIGTOP/site_properties.js |  7 ++++
 ambari-web/app/data/HDP2/site_properties.js   | 37 ++++++++++++++--------
 ambari-web/app/data/PHD/site_properties.js    | 12 +++++++
 ambari-web/app/utils/config.js                | 27 +++++++---------
 ambari-web/test/utils/config_test.js          | 15 ---------
 5 files changed, 54 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/df513801/ambari-web/app/data/BIGTOP/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/BIGTOP/site_properties.js b/ambari-web/app/data/BIGTOP/site_properties.js
index 36a7084..3485bed 100644
--- a/ambari-web/app/data/BIGTOP/site_properties.js
+++ b/ambari-web/app/data/BIGTOP/site_properties.js
@@ -2491,6 +2491,7 @@ module.exports =
       "displayType": "masterHost",
       "isOverridable": false,
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isReconfigurable": false,
       "serviceName": "HIVE",
       "filename": "hive-env.xml",
@@ -2508,6 +2509,7 @@ module.exports =
       "displayType": "masterHost",
       "isOverridable": false,
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isReconfigurable": false,
       "serviceName": "HIVE",
       "filename": "hive-env.xml",
@@ -2524,6 +2526,7 @@ module.exports =
       "description": "Using an existing Oracle database for Hive Metastore",
       "displayType": "masterHost",
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isOverridable": false,
       "isReconfigurable": false,
       "serviceName": "HIVE",
@@ -2542,6 +2545,7 @@ module.exports =
       "displayType": "masterHost",
       "isOverridable": false,
       "isVisible": false,
+      "isRequiredByAgent": false,
       "serviceName": "HIVE",
       "filename": "hive-env.xml",
       "category": "HIVE_METASTORE",
@@ -2607,6 +2611,7 @@ module.exports =
       "displayType": "host",
       "isOverridable": false,
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isObserved": true,
       "serviceName": "HIVE",
       "filename": "hive-env.xml",
@@ -2622,6 +2627,7 @@ module.exports =
       "displayType": "host",
       "isOverridable": false,
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isObserved": true,
       "serviceName": "HIVE",
       "filename": "hive-env.xml",
@@ -2637,6 +2643,7 @@ module.exports =
       "displayType": "host",
       "isOverridable": false,
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isObserved": true,
       "serviceName": "HIVE",
       "filename": "hive-env.xml",

http://git-wip-us.apache.org/repos/asf/ambari/blob/df513801/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index 7fd2c26..140e899 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -119,9 +119,6 @@ var hdp2properties = [
     "category": "NFS_GATEWAY",
     "serviceName": "HDFS",
     "filename": "hdfs-site.xml",
-    "stack": {
-      "HDP": "2.3"
-    },
     "index": 1
   },
   {
@@ -144,9 +141,6 @@ var hdp2properties = [
     "category": "NFS_GATEWAY",
     "serviceName": "HDFS",
     "filename": "hdfs-site.xml",
-    "stack": {
-      "HDP": "2.3"
-    },
     "index": 3
   },
   {
@@ -1037,10 +1031,7 @@ var hdp2properties = [
     "displayType": "masterHosts",
     "serviceName": "STORM",
     "filename": "storm-site.xml",
-    "category": "NIMBUS",
-    "stack": {
-      "HDP": "2.3"
-    }
+    "category": "NIMBUS"
   },
   {
     "id": "site property",
@@ -1874,10 +1865,7 @@ var hdp2properties = [
     "displayType": "advanced",
     "serviceName": "KAFKA",
     "filename": "kafka-broker.xml",
-    "category": "KAFKA_BROKER",
-    "stack": {
-      "HDP": "2.3"
-    }
+    "category": "KAFKA_BROKER"
   },
   {
     "id": "site property",
@@ -3323,6 +3311,7 @@ var hdp2properties = [
     "isOverridable": false,
     "isVisible": false,
     "isReconfigurable": false,
+    "isRequiredByAgent": false,
     "serviceName": "HIVE",
     "filename": "hive-env.xml",
     "category": "HIVE_METASTORE",
@@ -3339,6 +3328,7 @@ var hdp2properties = [
     "isOverridable": false,
     "isVisible": false,
     "isReconfigurable": false,
+    "isRequiredByAgent": false,
     "serviceName": "HIVE",
     "filename": "hive-env.xml",
     "category": "HIVE_METASTORE",
@@ -3355,6 +3345,7 @@ var hdp2properties = [
     "isOverridable": false,
     "isVisible": false,
     "isReconfigurable": false,
+    "isRequiredByAgent": false,
     "serviceName": "HIVE",
     "filename": "hive-env.xml",
     "category": "HIVE_METASTORE",
@@ -3372,6 +3363,7 @@ var hdp2properties = [
     "isOverridable": false,
     "isVisible": false,
     "isReconfigurable": false,
+    "isRequiredByAgent": false,
     "serviceName": "HIVE",
     "filename": "hive-env.xml",
     "category": "HIVE_METASTORE",
@@ -3389,6 +3381,7 @@ var hdp2properties = [
     "isVisible": false,
     "isOverridable": false,
     "isReconfigurable": false,
+    "isRequiredByAgent": false,
     "serviceName": "HIVE",
     "filename": "hive-env.xml",
     "category": "HIVE_METASTORE",
@@ -3405,6 +3398,7 @@ var hdp2properties = [
     "displayType": "masterHost",
     "isOverridable": false,
     "isReconfigurable": false,
+    "isRequiredByAgent": false,
     "isVisible": false,
     "serviceName": "HIVE",
     "filename": "hive-env.xml",
@@ -3474,6 +3468,7 @@ var hdp2properties = [
     "defaultValue": "",
     "displayType": "host",
     "isOverridable": false,
+    "isRequiredByAgent": false,
     "isVisible": false,
     "isObserved": true,
     "serviceName": "HIVE",
@@ -3489,6 +3484,7 @@ var hdp2properties = [
     "defaultValue": "",
     "displayType": "host",
     "isOverridable": false,
+    "isRequiredByAgent": false,
     "isVisible": false,
     "isObserved": true,
     "serviceName": "HIVE",
@@ -3504,6 +3500,7 @@ var hdp2properties = [
     "defaultValue": "",
     "displayType": "host",
     "isOverridable": false,
+    "isRequiredByAgent": false,
     "isVisible": false,
     "isObserved": true,
     "serviceName": "HIVE",
@@ -3536,6 +3533,7 @@ var hdp2properties = [
     "defaultValue": "",
     "displayType": "host",
     "isOverridable": false,
+    "isRequiredByAgent": false,
     "isVisible": false,
     "isObserved": true,
     "serviceName": "HIVE",
@@ -3551,6 +3549,7 @@ var hdp2properties = [
     "defaultValue": "",
     "displayType": "host",
     "isOverridable": false,
+    "isRequiredByAgent": false,
     "isVisible": false,
     "isObserved": true,
     "serviceName": "HIVE",
@@ -3722,6 +3721,7 @@ var hdp2properties = [
     "description": "Using an existing Oracle database for Oozie Metastore",
     "displayType": "masterHost",
     "isVisible": false,
+    "isRequiredByAgent": false,
     "isObserved": true,
     "isReconfigurable": false,
     "isOverridable": false,
@@ -3741,6 +3741,7 @@ var hdp2properties = [
     "displayType": "masterHost",
     "isOverridable": false,
     "isVisible": false,
+    "isRequiredByAgent": false,
     "isReconfigurable": false,
     "serviceName": "OOZIE",
     "filename": "oozie-env.xml",
@@ -3757,6 +3758,7 @@ var hdp2properties = [
     "description": "MySQL will be installed by Ambari",
     "displayType": "masterHost",
     "isVisible": false,
+    "isRequiredByAgent": false,
     "isReconfigurable": false,
     "isOverridable": false,
     "serviceName": "OOZIE",
@@ -3791,6 +3793,7 @@ var hdp2properties = [
     "description": "Using an existing MySQL database for Oozie Metastore",
     "displayType": "masterHost",
     "isVisible": false,
+    "isRequiredByAgent": false,
     "isReconfigurable": false,
     "isOverridable": false,
     "serviceName": "OOZIE",
@@ -3807,6 +3810,7 @@ var hdp2properties = [
     "description": "Using an existing MSSQL database with SQL authentication for Oozie Metastore",
     "displayType": "masterHost",
     "isVisible": false,
+    "isRequiredByAgent": false,
     "isReconfigurable": false,
     "isOverridable": false,
     "serviceName": "OOZIE",
@@ -3823,6 +3827,7 @@ var hdp2properties = [
     "description": "Using an existing MSSQL database with integrated authentication for Oozie
Metastore",
     "displayType": "masterHost",
     "isVisible": false,
+    "isRequiredByAgent": false,
     "isReconfigurable": false,
     "isOverridable": false,
     "serviceName": "OOZIE",
@@ -3910,6 +3915,7 @@ var hdp2properties = [
     "isOverridable": false,
     "displayType": "host",
     "isVisible": false,
+    "isRequiredByAgent": false,
     "isObserved": true,
     "serviceName": "OOZIE",
     "filename": "oozie-env.xml",
@@ -3925,6 +3931,7 @@ var hdp2properties = [
     "isOverridable": false,
     "displayType": "host",
     "isVisible": false,
+    "isRequiredByAgent": false,
     "isObserved": true,
     "serviceName": "OOZIE",
     "filename": "oozie-env.xml",
@@ -3940,6 +3947,7 @@ var hdp2properties = [
     "isOverridable": false,
     "displayType": "host",
     "isVisible": false,
+    "isRequiredByAgent": false,
     "isObserved": true,
     "serviceName": "OOZIE",
     "filename": "oozie-env.xml",
@@ -3958,6 +3966,7 @@ var hdp2properties = [
     "displayType": "masterHost",
     "isVisible": false,
     "isRequiredByAgent": false,
+    "isRequiredByAgent": false,
     "serviceName": "OOZIE",
     "filename": "oozie-env.xml",
     "category": "OOZIE_SERVER"

http://git-wip-us.apache.org/repos/asf/ambari/blob/df513801/ambari-web/app/data/PHD/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/PHD/site_properties.js b/ambari-web/app/data/PHD/site_properties.js
index cc565db..9c4017e 100644
--- a/ambari-web/app/data/PHD/site_properties.js
+++ b/ambari-web/app/data/PHD/site_properties.js
@@ -2339,6 +2339,7 @@ module.exports =
       "displayType": "masterHost",
       "isOverridable": false,
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isReconfigurable": false,
       "serviceName": "HIVE",
       "filename": "hive-env.xml",
@@ -2356,6 +2357,7 @@ module.exports =
       "displayType": "masterHost",
       "isOverridable": false,
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isReconfigurable": false,
       "serviceName": "HIVE",
       "filename": "hive-env.xml",
@@ -2372,6 +2374,7 @@ module.exports =
       "description": "Using an existing Oracle database for Hive Metastore",
       "displayType": "masterHost",
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isOverridable": false,
       "isReconfigurable": false,
       "serviceName": "HIVE",
@@ -2456,6 +2459,7 @@ module.exports =
       "displayType": "host",
       "isOverridable": false,
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isObserved": true,
       "serviceName": "HIVE",
       "filename": "hive-env.xml",
@@ -2471,6 +2475,7 @@ module.exports =
       "displayType": "host",
       "isOverridable": false,
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isObserved": true,
       "serviceName": "HIVE",
       "filename": "hive-env.xml",
@@ -2486,6 +2491,7 @@ module.exports =
       "displayType": "host",
       "isOverridable": false,
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isObserved": true,
       "serviceName": "HIVE",
       "filename": "hive-env.xml",
@@ -2650,6 +2656,7 @@ module.exports =
       "description": "Using an existing Oracle database for Oozie Metastore",
       "displayType": "masterHost",
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isObserved": true,
       "isReconfigurable": false,
       "isOverridable": false,
@@ -2669,6 +2676,7 @@ module.exports =
       "displayType": "masterHost",
       "isOverridable": false,
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isReconfigurable": false,
       "serviceName": "OOZIE",
       "filename": "oozie-env.xml",
@@ -2718,6 +2726,7 @@ module.exports =
       "description": "Using an existing MySQL database for Oozie Metastore",
       "displayType": "masterHost",
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isReconfigurable": false,
       "isOverridable": false,
       "serviceName": "OOZIE",
@@ -2809,6 +2818,7 @@ module.exports =
       "isOverridable": false,
       "displayType": "host",
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isObserved": true,
       "serviceName": "OOZIE",
       "filename": "oozie-env.xml",
@@ -2824,6 +2834,7 @@ module.exports =
       "isOverridable": false,
       "displayType": "host",
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isObserved": true,
       "serviceName": "OOZIE",
       "filename": "oozie-env.xml",
@@ -2839,6 +2850,7 @@ module.exports =
       "isOverridable": false,
       "displayType": "host",
       "isVisible": false,
+      "isRequiredByAgent": false,
       "isObserved": true,
       "serviceName": "OOZIE",
       "filename": "oozie-env.xml",

http://git-wip-us.apache.org/repos/asf/ambari/blob/df513801/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index b4a1d82..40c6ce5 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -113,27 +113,17 @@ App.config = Em.Object.create({
 
   preDefinedSiteProperties: function () {
     var sitePropertiesForCurrentStack = this.preDefinedConfigFile('site_properties');
-    // default is HDP2
-    var configProperties = require('data/HDP2/site_properties').configProperties;
     if (sitePropertiesForCurrentStack) {
       return sitePropertiesForCurrentStack.configProperties;
     }
-
     if (App.get('isHadoop23Stack')) {
       return require('data/HDP2.3/site_properties').configProperties;
     }
     if (App.get('isHadoop22Stack')) {
-      configProperties = require('data/HDP2.2/site_properties').configProperties;
+      return require('data/HDP2.2/site_properties').configProperties;
     }
-    // filter config properties by stack name and version if defined
-    return configProperties.filter(function(item) {
-      if (item.stack) {
-        var stackVersion = item.stack[App.get('currentStackName')];
-        return stackVersion && stringUtils.compareVersions(App.get('currentStackVersionNumber'),
stackVersion) > -1;
-      }
-      return true;
-    });
-  }.property('App.isHadoop22Stack', 'App.isHadoop23Stack', 'App.currentStackName'),
+    return require('data/HDP2/site_properties').configProperties;
+  }.property('App.isHadoop22Stack', 'App.isHadoop23Stack'),
 
   preDefinedConfigFile: function(file) {
     try {
@@ -336,7 +326,6 @@ App.config = Em.Object.create({
           supportsFinal: advancedConfig ? Em.get(advancedConfig, 'supportsFinal') : this.shouldSupportFinal(serviceName,
_tag.siteName)
 
         });
-
         if (configsPropertyDef) {
           this.setServiceConfigUiAttributes(serviceConfigObj, configsPropertyDef);
           // check if defined UI config present in config list obtained from server.
@@ -487,7 +476,7 @@ App.config = Em.Object.create({
     return {
       configs: siteStart.concat(siteConfigs.sortProperty('name')),
       mappingConfigs: configSet.mappingConfigs
-    }
+    };
   },
 
   /**
@@ -542,6 +531,14 @@ App.config = Em.Object.create({
         }
         else if (preDefined && !stored) {
           configData = preDefined;
+          // skip property if predefined config doesn't exist or ignored in stack property
definition for current stack.
+          // if `isRequiredByAgent` is set to `false` then this property used by UI only
to display properties like
+          // host names or some misc properties that won't be persisted.
+          if (Em.get(preDefined, 'isRequiredByAgent') !== false && !isAdvanced &&
+              Em.get(preDefined, 'filename') != 'alert_notification' &&
+              !['hive_hostname', 'oozie_hostname'].contains(Em.get(preDefined, 'name')))
{
+            return;
+          }
           configData.isRequiredByAgent = (configData.isRequiredByAgent !== undefined) ? configData.isRequiredByAgent
: true;
           if (isAdvanced) {
             var advanced = advancedConfigs.filterProperty('filename', configData.filename).findProperty('name',
configData.name);

http://git-wip-us.apache.org/repos/asf/ambari/blob/df513801/ambari-web/test/utils/config_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/config_test.js b/ambari-web/test/utils/config_test.js
index a961743..ccc6931 100644
--- a/ambari-web/test/utils/config_test.js
+++ b/ambari-web/test/utils/config_test.js
@@ -431,21 +431,6 @@ describe('App.config', function () {
     });
   });
 
-  describe('#preDefinedSiteProperties-stack-attribute', function() {
-    var HDP23Only = ['nfs.file.dump.dir', 'nfs.exports.allowed.hosts', 'nimbus.seeds'];
-    it('should ignore properties that not belongs to stack HDP - 2.2', function() {
-      setups.setupStackVersion(this, 'HDP-2.2');
-      expect(App.config.get('preDefinedSiteProperties').mapProperty('name')).to.not.include.members(HDP23Only);
-      setups.restoreStackVersion(this);
-    });
-
-    it('properties related to HDP-2.3 stack only should be present', function() {
-      setups.setupStackVersion(this, 'HDP-2.3');
-      expect(App.config.get('preDefinedSiteProperties').mapProperty('name')).to.include.members(HDP23Only);
-      setups.restoreStackVersion(this);
-    });
-  });
-
   describe('#generateConfigPropertiesByName', function() {
     var tests = [
       {


Mime
View raw message