Browse Source

Revert "AMBARI-2989 UI needs ability to categorize, name and describe non-global configurations. (atkach)"

This reverts commit cfa2f7f304c932f9d6e2383231976acc4dccf406.
Srimanth Gunturi 12 years ago
parent
commit
43198bf607

+ 1 - 1
ambari-web/app/controllers/main/admin/security/add/step4.js

@@ -366,7 +366,7 @@ App.MainAdminSecurityAddStep4Controller = Em.Controller.extend({
   loadGlobals: function () {
     var globals = this.get('content.serviceConfigProperties').filterProperty('id', 'puppet var');
     this.set('globalProperties', globals);
-    this.loadStaticGlobal(); //Hack for properties which are declared in global_properties.js and not able to retrieve values declared in secure_properties.js
+    this.loadStaticGlobal(); //Hack for properties which are declared in config_properties.js and not able to retrieve values declared in secure_properties.js
     this.loadUsersToGlobal();
     this.loadHostNamesToGlobal();
     this.loadPrimaryNamesToGlobals();

+ 2 - 2
ambari-web/app/controllers/main/service/info/configs.js

@@ -39,8 +39,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('preDefinedConfigProperties');
+  }.property('App.config.preDefinedConfigProperties'),
 
   secureConfigs: require('data/secure_mapping'),
 

+ 81 - 106
ambari-web/app/data/HDP2/global_properties.js → ambari-web/app/data/HDP2/config_properties.js

@@ -93,7 +93,7 @@ module.exports =
     },
     {
       "id": "puppet var",
-      "name": "dfs_name_dir",
+      "name": "dfs_namenode_name_dir",
       "displayName": "NameNode directories",
       "description": "NameNode directories for HDFS to store the file system image",
       "defaultValue": "",
@@ -153,7 +153,7 @@ module.exports =
     },
     {
       "id": "puppet var",
-      "name": "fs_checkpoint_dir",
+      "name": "dfs_namenode_checkpoint_dir",
       "displayName": "SecondaryNameNode Checkpoint directory",
       "description": "Directory on the local filesystem where the Secondary NameNode should store the temporary images to merge",
       "defaultValue": "",
@@ -184,7 +184,7 @@ module.exports =
     },
     {
       "id": "puppet var",
-      "name": "dfs_data_dir",
+      "name": "dfs_datanode_data_dir",
       "displayName": "DataNode directories",
       "description": "DataNode directories for HDFS to store the data blocks",
       "defaultValue": "",
@@ -264,7 +264,7 @@ module.exports =
     },
     {
       "id": "puppet var",
-      "name": "fs_checkpoint_period",
+      "name": "dfs_namenode_checkpoint_period",
       "displayName": "HDFS Maximum Checkpoint Delay",
       "description": "Maximum delay between two consecutive checkpoints for HDFS",
       "defaultValue": "21600",
@@ -345,19 +345,6 @@ module.exports =
       "serviceName": "HDFS",
       "category": "Advanced"
     },
-    {
-      "id": "puppet var",
-      "name": "dfs_include",
-      "displayName": "Include hosts",
-      "description": "Names a file that contains a list of hosts that are permitted to connect to the namenode.  This file will be placed inside the Hadoop conf directory.",
-      "defaultValue": "dfs.include",
-      "displayType": "advanced",
-      "isVisible": true,
-      "filename": "hdfs-site.xml",
-      "domain": "global",
-      "serviceName": "HDFS",
-      "category": "Advanced"
-    },
     {
       "id": "puppet var",
       "name": "dfs_replication",
@@ -440,6 +427,19 @@ module.exports =
       "serviceName": "HDFS",
       "category": "Advanced"
     },
+    {
+      "id": "puppet var",
+      "name": "hdfs_enable_shortcircuit_read",
+      "displayName": "HDFS Short-circuit read",
+      "description": "",
+      "defaultValue": true,
+      "isRequired": false,
+      "displayType": "checkbox",
+      "isVisible": true,
+      "domain": "global",
+      "serviceName": "HDFS",
+      "category": "Advanced"
+    },
 
   /**********************************************MAPREDUCE2***************************************/
     {
@@ -458,32 +458,7 @@ module.exports =
     },
     {
       "id": "puppet var",
-      "name": "mapred_local_dir",
-      "displayName": "MapReduce local directories",
-      "description": "Directories for MapReduce to store intermediate data files",
-      "defaultValue": "",
-      "defaultDirectory": "/hadoop/mapred",
-      "displayType": "directories",
-      "isReconfigurable": true,
-      "isVisible": true,
-      "domain": "global",
-      "serviceName": "MAPREDUCE2"
-    },
-    {
-      "id": "puppet var",
-      "name": "mapred_cluster_red_mem_mb",
-      "displayName": "Cluster's Reduce slot size (virtual memory)",
-      "description": "The virtual memory size of a single Reduce slot in the MapReduce framework",
-      "defaultValue": "2048",
-      "displayType": "int",
-      "unit": "MB",
-      "isVisible": true,
-      "domain": "global",
-      "serviceName": "MAPREDUCE2"
-    },
-    {
-      "id": "puppet var",
-      "name": "mapred_map_tasks_max",
+      "name": "mapreduce_tasktracker_map_tasks_maximum",
       "displayName": "Number of Map slots per node",
       "description": "Number of slots that Map tasks that run simultaneously can occupy on a TaskTracker",
       "defaultValue": "4",
@@ -494,7 +469,7 @@ module.exports =
     },
     {
       "id": "puppet var",
-      "name": "mapred_job_map_mem_mb",
+      "name": "mapreduce_map_memory_mb",
       "displayName": "Default virtual memory for a job's map-task",
       "description": "Virtual memory for single Map task",
       "defaultValue": "1536",
@@ -506,7 +481,7 @@ module.exports =
     },
     {
       "id": "puppet var",
-      "name": "mapred_job_red_mem_mb",
+      "name": "mapreduce_reduce_memory_mb",
       "displayName": "Default virtual memory for a job's reduce-task",
       "description": "Virtual memory for single Reduce task",
       "defaultValue": "2048",
@@ -551,30 +526,6 @@ module.exports =
       "domain": "global",
       "serviceName": "MAPREDUCE2"
     },
-    {
-      "id": "puppet var",
-      "name": "mapred_cluster_max_map_mem_mb",
-      "displayName": "Upper limit on virtual memory for single Map task",
-      "description": "Upper limit on virtual memory size for a single Map task of any MapReduce job",
-      "defaultValue": "6144",
-      "displayType": "int",
-      "unit": "MB",
-      "isVisible": true,
-      "domain": "global",
-      "serviceName": "MAPREDUCE2"
-    },
-    {
-      "id": "puppet var",
-      "name": "mapred_cluster_max_red_mem_mb",
-      "displayName": "Upper limit on virtual memory for single Reduce task",
-      "description": "Upper limit on virtual memory size for a single Reduce task of any MapReduce job",
-      "defaultValue": "4096",
-      "displayType": "int",
-      "unit": "MB",
-      "isVisible": true,
-      "domain": "global",
-      "serviceName": "MAPREDUCE2"
-    },
     {
       "id": "puppet var",
       "name": "scheduler_name",
@@ -588,19 +539,7 @@ module.exports =
     },
     {
       "id": "puppet var",
-      "name": "mapred_cluster_map_mem_mb",
-      "displayName": "Cluster's Map slot size (virtual memory)",
-      "description": "The virtual memory size of a single Map slot in the MapReduce framework",
-      "defaultValue": "1536",
-      "displayType": "int",
-      "unit": "MB",
-      "isVisible": true,
-      "domain": "global",
-      "serviceName": "MAPREDUCE2"
-    },
-    {
-      "id": "puppet var",
-      "name": "mapred_system_dir",
+      "name": "mapreduce_jobtracker_system_dir",
       "displayName": "MapReduce system directories",
       "description": "",
       "defaultValue": "/mapred/system",
@@ -619,6 +558,7 @@ module.exports =
       "defaultValue": "/var/log/hadoop-mapreduce",
       "displayType": "directory",
       "isVisible": true,
+      "isReconfigurable": false,
       "domain": "global",
       "serviceName": "MAPREDUCE2",
       "category": "Advanced"
@@ -631,6 +571,7 @@ module.exports =
       "defaultValue": "/var/run/hadoop-mapreduce",
       "displayType": "directory",
       "isVisible": true,
+      "isReconfigurable": false,
       "domain": "global",
       "serviceName": "MAPREDUCE2",
       "category": "Advanced"
@@ -684,11 +625,26 @@ module.exports =
       "category": "Advanced"
     },
   /**********************************************YARN***************************************/
+    {
+      "id": "puppet var",
+      "name": "yarn_heapsize",
+      "displayName": "Yarn Java heap size",
+      "description": "Max heapsize for all YARN components",
+      "defaultValue": "1024",
+      "isOverridable": false,
+      "displayType": "int",
+      "unit": "MB",
+      "isVisible": true,
+      "domain": "global",
+      "serviceName": "YARN",
+      "category": "General",
+      "index": 0
+    },
     {
       "id": "puppet var",
       "name": "rm_host",
-      "displayName": "Resource Manager",
-      "description": "Resource Manager",
+      "displayName": "ResourceManager",
+      "description": "ResourceManager",
       "defaultValue": "",
       "isOverridable": false,
       "displayType": "masterHost",
@@ -698,11 +654,26 @@ module.exports =
       "category": "ResourceManager",
       "index": 0
     },
+    {
+      "id": "puppet var",
+      "name": "resourcemanager_heapsize",
+      "displayName": "ResourceManager Java heap size",
+      "description": "Max heapsize for ResourceManager",
+      "defaultValue": "1024",
+      "isOverridable": false,
+      "displayType": "int",
+      "unit": "MB",
+      "isVisible": true,
+      "domain": "global",
+      "serviceName": "YARN",
+      "category": "ResourceManager",
+      "index": 0
+    },
     {
       "id": "puppet var",
       "name": "nm_hosts",
-      "displayName": "Node Manager",
-      "description": "List of Node Manager Hosts.",
+      "displayName": "NodeManager",
+      "description": "List of NodeManager Hosts.",
       "defaultValue": "",
       "isOverridable": false,
       "displayType": "slaveHosts",
@@ -712,6 +683,21 @@ module.exports =
       "category": "NodeManager",
       "index": 0
     },
+    {
+      "id": "puppet var",
+      "name": "nodemanager_heapsize",
+      "displayName": "NodeManager Java heap size",
+      "description": "Max heapsize for NodeManager",
+      "defaultValue": "1024",
+      "isOverridable": false,
+      "displayType": "int",
+      "unit": "MB",
+      "isVisible": true,
+      "domain": "global",
+      "serviceName": "YARN",
+      "category": "NodeManager",
+      "index": 0
+    },
     {
       "id": "puppet var",
       "name": "yarn_log_dir_prefix",
@@ -719,6 +705,7 @@ module.exports =
       "description": "",
       "defaultValue": "/var/log/hadoop-yarn",
       "displayType": "directory",
+      "isReconfigurable": false,
       "isVisible": true,
       "domain": "global",
       "serviceName": "YARN",
@@ -732,6 +719,7 @@ module.exports =
       "defaultValue": "/var/run/hadoop-yarn",
       "displayType": "directory",
       "isVisible": true,
+      "isReconfigurable": false,
       "domain": "global",
       "serviceName": "YARN",
       "category": "Advanced"
@@ -993,19 +981,6 @@ module.exports =
       "serviceName": "HBASE",
       "category": "Advanced"
     },
-    {
-      "id": "puppet var",
-      "name": "hdfs_enable_shortcircuit_read",
-      "displayName": "HDFS Short-circuit read",
-      "description": "",
-      "defaultValue": true,
-      "isRequired": false,
-      "displayType": "checkbox",
-      "isVisible": true,
-      "domain": "global",
-      "serviceName": "HBASE",
-      "category": "Advanced"
-    },
     {
       "id": "puppet var",
       "name": "hdfs_support_append",
@@ -1241,7 +1216,7 @@ module.exports =
       "displayName": "Database Name",
       "description": "Database name used as the Hive Metastore",
       "defaultValue": "hive",
-      "isReconfigurable": false,
+      "isReconfigurable": true,
       "displayType": "host",
       "isOverridable": false,
       "isVisible": true,
@@ -1257,7 +1232,7 @@ module.exports =
       "displayName": "Database Username",
       "description": "Database user name to use to connect to the database",
       "defaultValue": "hive",
-      "isReconfigurable": false,
+      "isReconfigurable": true,
       "displayType": "user",
       "isOverridable": false,
       "isVisible": true,
@@ -1272,7 +1247,7 @@ module.exports =
       "displayName": "Database Password",
       "description": "Database password to use to connect to the PostgreSQL database",
       "defaultValue": "",
-      "isReconfigurable": false,
+      "isReconfigurable": true,
       "displayType": "password",
       "isOverridable": false,
       "isVisible": true,
@@ -1573,7 +1548,7 @@ module.exports =
       "displayName": "Database Name",
       "description": "Database name used for the Oozie",
       "defaultValue": "oozie",
-      "isReconfigurable": false,
+      "isReconfigurable": true,
       "isOverridable": false,
       "displayType": "host",
       "isVisible": true,
@@ -1589,7 +1564,7 @@ module.exports =
       "displayName": "Database Username",
       "description": "Database user name to use to connect to the database",
       "defaultValue": "oozie",
-      "isReconfigurable": false,
+      "isReconfigurable": true,
       "isOverridable": false,
       "displayType": "user",
       "isVisible": true,
@@ -1604,7 +1579,7 @@ module.exports =
       "displayName": "Database Password",
       "description": "Database password to use to connect to the database",
       "defaultValue": "",
-      "isReconfigurable": false,
+      "isReconfigurable": true,
       "isOverridable": false,
       "displayType": "password",
       "isVisible": true,
@@ -1634,7 +1609,7 @@ module.exports =
       "description": "Data directory in which the Oozie DB exists",
       "defaultValue": "",
       "defaultDirectory": "/hadoop/oozie/data",
-      "isReconfigurable": false,
+      "isReconfigurable": true,
       "displayType": "directory",
       "isOverridable": false,
       "isVisible": true,

+ 0 - 22
ambari-web/app/data/HDP2/site_properties.js

@@ -1,22 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-module.exports =
-{
-  "configProperties": [
-  ]
-};

+ 16 - 16
ambari-web/app/data/global_properties.js → ambari-web/app/data/config_properties.js

@@ -1860,22 +1860,22 @@ module.exports =
       "index": 7
     },
     {
-          "id": "puppet var",
-          "name": "oozie_data_dir",
-          "displayName": "Oozie Data Dir",
-          "description": "Data directory in which the Oozie DB exists",
-          "defaultValue": "",
-          "defaultDirectory": "/hadoop/oozie/data",
-          "isReconfigurable": false,
-          "displayType": "directory",
-          "isOverridable": false,
-          "isVisible": true,
-          "isRequired": false,
-          "domain": "global",
-          "serviceName": "OOZIE",
-          "category": "Oozie Server",
-          "index": 8
-      },
+      "id": "puppet var",
+      "name": "oozie_data_dir",
+      "displayName": "Oozie Data Dir",
+      "description": "Data directory in which the Oozie DB exists",
+      "defaultValue": "",
+      "defaultDirectory": "/hadoop/oozie/data",
+      "isReconfigurable": true,
+      "displayType": "directory",
+      "isOverridable": false,
+      "isVisible": true,
+      "isRequired": false,
+      "domain": "global",
+      "serviceName": "OOZIE",
+      "category": "Oozie Server",
+      "index": 8
+    },
 
     {
       "id": "puppet var",

+ 0 - 22
ambari-web/app/data/site_properties.js

@@ -1,22 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-module.exports =
-{
-  "configProperties": [
-  ]
-};

+ 9 - 15
ambari-web/app/utils/config.js

@@ -26,31 +26,25 @@ var globalPropertyToServicesMap = null;
 App.config = Em.Object.create({
 
   preDefinedServiceConfigs: function(){
-    var configs = this.get('preDefinedGlobalProperties');
+    var configs = this.get('preDefinedConfigProperties');
     var services = [];
     require('data/service_configs').forEach(function(service){
       service.configs = configs.filterProperty('serviceName', service.serviceName);
       services.push(service);
     });
     return services;
-  }.property('preDefinedGlobalProperties'),
+  }.property('preDefinedConfigProperties'),
   configMapping: function() {
       if (App.get('isHadoop2Stack')) {
         return require('data/HDP2/config_mapping');
       }
     return require('data/config_mapping');
   }.property('App.isHadoop2Stack'),
-  preDefinedGlobalProperties: function() {
+  preDefinedConfigProperties: function() {
     if (App.get('isHadoop2Stack')) {
-      return require('data/HDP2/global_properties').configProperties;
+      return require('data/HDP2/config_properties').configProperties;
     }
-    return require('data/global_properties').configProperties;
-  }.property('App.isHadoop2Stack'),
-  preDefinedSiteProperties: function() {
-    if (App.get('isHadoop2Stack')) {
-      return require('data/HDP2/site_properties').configProperties;
-    }
-    return require('data/site_properties').configProperties;
+    return require('data/config_properties').configProperties;
   }.property('App.isHadoop2Stack'),
   preDefinedCustomConfigs: function () {
     if (App.get('isHadoop2Stack')) {
@@ -168,7 +162,7 @@ App.config = Em.Object.create({
   mergePreDefinedWithLoaded: function (configGroups, advancedConfigs, tags, serviceName) {
     var configs = [];
     var globalConfigs = [];
-    var preDefinedConfigs = this.get('preDefinedGlobalProperties').concat(this.get('preDefinedSiteProperties'));
+    var preDefinedConfigs = this.get('preDefinedConfigProperties');
     var mappingConfigs = [];
 
     tags.forEach(function (_tag) {
@@ -212,7 +206,7 @@ App.config = Em.Object.create({
           if (configsPropertyDef) {
             this.handleSpecialProperties(serviceConfigObj);
           } else {
-            serviceConfigObj.isVisible = false;  // if the global property is not defined on ui metadata global_properties.js then it shouldn't be a part of errorCount
+            serviceConfigObj.isVisible = false;  // if the global property is not defined on ui metadata config_properties.js then it shouldn't be a part of errorCount
           }
           serviceConfigObj.id = 'puppet var';
           serviceConfigObj.displayName = configsPropertyDef ? configsPropertyDef.displayName : null;
@@ -246,14 +240,14 @@ App.config = Em.Object.create({
    */
   mergePreDefinedWithStored: function (storedConfigs, advancedConfigs) {
     var mergedConfigs = [];
-    var preDefinedConfigs = $.extend(true, [], this.get('preDefinedGlobalProperties').concat(this.get('preDefinedSiteProperties')));
+    var preDefinedConfigs = $.extend(true, [], this.get('preDefinedConfigProperties'));
     var preDefinedNames = [];
     var storedNames = [];
     var names = [];
     var categoryMetaData = null;
     storedConfigs = (storedConfigs) ? storedConfigs : [];
 
-    preDefinedNames = preDefinedConfigs.mapProperty('name');
+    preDefinedNames = this.get('preDefinedConfigProperties').mapProperty('name');
     storedNames = storedConfigs.mapProperty('name');
     names = preDefinedNames.concat(storedNames).uniq();
     names.forEach(function (name) {