Forráskód Böngészése

AMBARI-2906. Add support for the following global config parameters for Yarn. (jaimin via yusaku)

Yusaku Sako 11 éve
szülő
commit
9c3940bd07

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

@@ -1345,12 +1345,13 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
    * @return {Object}
    */
   createGlobalSiteObj: function (tagName) {
+    var heapsizeException =  ['hadoop_heapsize','yarn_heapsize','nodemanager_heapsize','resourcemanager_heapsize'];
     var globalSiteProperties = {};
     this.get('globalConfigs').forEach(function (_globalSiteObj) {
       // do not pass any globalConfigs whose name ends with _host or _hosts
       if (!/_hosts?$/.test(_globalSiteObj.name)) {
         // append "m" to JVM memory options except for hadoop_heapsize
-        if (/_heapsize|_newsize|_maxnewsize$/.test(_globalSiteObj.name) && _globalSiteObj.name !== 'hadoop_heapsize') {
+        if (/_heapsize|_newsize|_maxnewsize$/.test(_globalSiteObj.name) && !heapsizeException.contains(_globalSiteObj.name)) {
           _globalSiteObj.value += "m";
         }
         globalSiteProperties[_globalSiteObj.name] = _globalSiteObj.value;

+ 2 - 1
ambari-web/app/controllers/wizard/step8_controller.js

@@ -1365,10 +1365,11 @@ App.WizardStep8Controller = Em.Controller.extend({
     }
     
     globalSiteObj.forEach(function (_globalSiteObj) {
+      var heapsizeException =  ['hadoop_heapsize','yarn_heapsize','nodemanager_heapsize','resourcemanager_heapsize'];
       // do not pass any globals whose name ends with _host or _hosts
       if (!/_hosts?$/.test(_globalSiteObj.name)) {
         // append "m" to JVM memory options except for hadoop_heapsize
-        if (/_heapsize|_newsize|_maxnewsize$/.test(_globalSiteObj.name) && _globalSiteObj.name !== 'hadoop_heapsize') {
+        if (/_heapsize|_newsize|_maxnewsize$/.test(_globalSiteObj.name) && !heapsizeException.contains(_globalSiteObj.name)) {
           globalSiteProperties[_globalSiteObj.name] = _globalSiteObj.value + "m";
         } else {
           globalSiteProperties[_globalSiteObj.name] = _globalSiteObj.value;

+ 45 - 0
ambari-web/app/data/HDP2/config_properties.js

@@ -686,6 +686,21 @@ 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",
@@ -700,6 +715,21 @@ 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",
@@ -714,6 +744,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",