Bladeren bron

AMBARI-10471. YARN CGroups and NodeLabels should only be HDP-2.3 enhanced configs (srimanth)

Srimanth Gunturi 10 jaren geleden
bovenliggende
commit
db3bd809aa

+ 1 - 12
ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-site.xml

@@ -77,7 +77,7 @@
     <description>
       Enable RM work preserving recovery. This configuration is private to YARN for experimenting the feature.
     </description>
-    <dispaly-name>Enable Work Preserving Restart</dispaly-name>
+    <display-name>Enable Work Preserving Restart</display-name>
     <value-attributes>
       <type>boolean</type>
     </value-attributes>
@@ -376,15 +376,4 @@
       </property>
     </depends-on>
   </property>
-  <property>
-    <name>yarn.node-labels.enabled</name>
-    <value>false</value>
-    <description>
-      Enabled node labels to restrict YARN applications so that they run only on cluster nodes that have a specified node label.
-    </description>
-    <dispaly-name>Enable Node Labels</dispaly-name>
-    <value-attributes>
-      <type>boolean</type>
-    </value-attributes>
-  </property>
 </configuration>

+ 0 - 10
ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/themes/theme.json

@@ -127,10 +127,6 @@
           "config": "yarn-site/yarn.scheduler.maximum-allocation-vcores",
           "subsection-name": "subsection-container-sizing-col2"
         },
-        {
-          "config": "yarn-site/yarn.node-labels.enabled",
-          "subsection-name": "subsection-yarn-platform-features-col1"
-        },
         {
           "config": "yarn-site/yarn.resourcemanager.work-preserving-recovery.enabled",
           "subsection-name": "subsection-yarn-platform-features-col1"
@@ -230,12 +226,6 @@
           ]
         }
       },
-      {
-        "config": "yarn-site/yarn.node-labels.enabled",
-        "widget": {
-          "type": "checkbox"
-        }
-      },
       {
         "config": "yarn-site/yarn.log-aggregation-enable",
         "widget": {

+ 33 - 0
ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * 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.
+ */
+-->
+
+<configuration>
+  <property>
+    <name>yarn_cgroups_enabled</name>
+    <value>false</value>
+    <description>You can use CGroups to isolate CPU-heavy processes in a Hadoop cluster.</description>
+    <display-name>Enable CGroup Isolation</display-name>
+    <value-attributes>
+      <type>boolean</type>
+    </value-attributes>
+  </property>
+</configuration>

+ 25 - 2
ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-site.xml

@@ -27,11 +27,34 @@
     <description>If user want to enable this feature, specify it to "org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMNodeLabelsManager</description>
     <deleted>true</deleted>
   </property>
-
   <property>
     <name>yarn.node-labels.enabled</name>
     <value>false</value>
-    <description>Enable node labels</description>
+    <description>
+      Enabled node labels to restrict YARN applications so that they run only on cluster nodes that have a specified node label.
+    </description>
+    <dispaly-name>Enable Node Labels</dispaly-name>
+    <value-attributes>
+      <type>boolean</type>
+    </value-attributes>
+  </property>
+  <property>
+    <name>yarn.nodemanager.container-executor.class</name>
+    <depends-on>
+      <property>
+        <type>yarn-env</type>
+        <name>yarn_cgroups_enabled</name>
+      </property>
+    </depends-on>
+  </property>
+  <property>
+    <name>yarn.nodemanager.linux-container-executor.group</name>
+    <depends-on>
+      <property>
+        <type>yarn-env</type>
+        <name>yarn_cgroups_enabled</name>
+      </property>
+    </depends-on>
   </property>
 
 </configuration>

+ 7 - 0
ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/metainfo.xml

@@ -50,6 +50,13 @@
           </packages>
         </osSpecific>
       </osSpecifics>
+      
+      <themes>
+        <theme>
+          <fileName>theme.json</fileName>
+          <default>true</default>
+        </theme>
+      </themes>
     </service>
 
     <service>

+ 173 - 0
ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/themes/theme.json

@@ -0,0 +1,173 @@
+{
+  "Theme": {
+    "name": "default",
+    "description": "Default theme for YARN service",
+    "placement": {
+      "configuration-layout": "default",
+      "configs": [
+        {
+          "config": "yarn-site/yarn.nodemanager.resource.memory-mb",
+          "subsection-name": "subsection-nm-sizing-col1"
+        },
+        {
+          "config": "yarn-site/yarn.nodemanager.vmem-pmem-ratio",
+          "subsection-name": "subsection-nm-sizing-col1"
+        },
+        {
+          "config": "yarn-site/yarn.nodemanager.resource.percentage-physical-cpu-limit",
+          "subsection-name": "subsection-nm-sizing-col2"
+        },
+        {
+          "config": "yarn-site/yarn.nodemanager.resource.cpu-vcores",
+          "subsection-name": "subsection-nm-sizing-col2"
+        },
+        {
+          "config": "yarn-site/yarn.scheduler.minimum-allocation-mb",
+          "subsection-name": "subsection-container-sizing-col1"
+        },
+        {
+          "config": "yarn-site/yarn.scheduler.maximum-allocation-mb",
+          "subsection-name": "subsection-container-sizing-col1"
+        },
+        {
+          "config": "yarn-site/yarn.scheduler.minimum-allocation-vcores",
+          "subsection-name": "subsection-container-sizing-col2"
+        },
+        {
+          "config": "yarn-site/yarn.scheduler.maximum-allocation-vcores",
+          "subsection-name": "subsection-container-sizing-col2"
+        },
+        {
+          "config": "yarn-site/yarn.node-labels.enabled",
+          "subsection-name": "subsection-yarn-platform-features-col1"
+        },
+        {
+          "config": "yarn-env/yarn_cgroups_enabled",
+          "subsection-name": "subsection-yarn-platform-features-col1"
+        },
+        {
+          "config": "yarn-site/yarn.resourcemanager.work-preserving-recovery.enabled",
+          "subsection-name": "subsection-yarn-platform-features-col1"
+        },
+        {
+          "config": "yarn-site/yarn.log-aggregation-enable",
+          "subsection-name": "subsection-yarn-platform-features-col1"
+        }
+      ]
+    },
+    "widgets": [
+      {
+        "config": "yarn-site/yarn.nodemanager.resource.memory-mb",
+        "widget": {
+          "type": "slider",
+          "units": [
+            {
+              "unit-name": "MB"
+            }
+          ]
+        }
+      },
+      {
+        "config": "yarn-site/yarn.nodemanager.vmem-pmem-ratio",
+        "widget": {
+          "type": "slider",
+          "units": [
+            {
+              "unit-name": "float"
+            }
+          ]
+        }
+      },
+      {
+        "config": "yarn-site/yarn.nodemanager.resource.percentage-physical-cpu-limit",
+        "widget": {
+          "type": "slider",
+          "units": [
+            {
+              "unit-name": "percent"
+            }
+          ]
+        }
+      },
+      {
+        "config": "yarn-site/yarn.nodemanager.resource.cpu-vcores",
+        "widget": {
+          "type": "slider",
+          "units": [
+            {
+              "unit-name": "int"
+            }
+          ]
+        }
+      },
+      {
+        "config": "yarn-site/yarn.scheduler.minimum-allocation-mb",
+        "widget": {
+          "type": "slider",
+          "units": [
+            {
+              "unit-name": "MB"
+            }
+          ]
+        }
+      },
+      {
+        "config": "yarn-site/yarn.scheduler.maximum-allocation-mb",
+        "widget": {
+          "type": "slider",
+          "units": [
+            {
+              "unit-name": "MB"
+            }
+          ]
+        }
+      },
+      {
+        "config": "yarn-site/yarn.scheduler.minimum-allocation-vcores",
+        "widget": {
+          "type": "slider",
+          "units": [
+            {
+              "unit-name": "int"
+            }
+          ]
+        }
+      },
+      {
+        "config": "yarn-site/yarn.scheduler.maximum-allocation-vcores",
+        "widget": {
+          "type": "slider",
+          "units": [
+            {
+              "unit-name": "int"
+            }
+          ]
+        }
+      },
+      {
+        "config": "yarn-site/yarn.node-labels.enabled",
+        "widget": {
+          "type": "checkbox"
+        }
+      },
+      {
+        "config": "yarn-env/yarn_cgroups_enabled",
+        "widget": {
+          "type": "checkbox"
+        }
+      },
+      {
+        "config": "yarn-site/yarn.log-aggregation-enable",
+        "widget": {
+          "type": "checkbox"
+        }
+      },
+      {
+        "config": "yarn-site/yarn.resourcemanager.work-preserving-recovery.enabled",
+        "widget": {
+          "type": "checkbox"
+        }
+      }
+    ]
+  }
+}