ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vbrodets...@apache.org
Subject ambari git commit: AMBARI-19947. To make sure LLAP preemption happens correctly, should enable priority-utilization.underutilized-preemption.enabled=true when YARN preemption is enabled.(vbrodetskyi)
Date Fri, 10 Feb 2017 12:53:54 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 8ab8fb8ed -> 0593c8792


AMBARI-19947. To make sure LLAP preemption happens correctly, should enable priority-utilization.underutilized-preemption.enabled=true
when YARN preemption is enabled.(vbrodetskyi)


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

Branch: refs/heads/branch-2.5
Commit: 0593c87926582fbcc967e936dce0c89f345f4dc0
Parents: 8ab8fb8
Author: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Authored: Fri Feb 10 14:46:10 2017 +0200
Committer: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Committed: Fri Feb 10 14:46:10 2017 +0200

----------------------------------------------------------------------
 .../HDP/2.6/services/YARN/configuration/yarn-site.xml   | 12 ++++++++++++
 .../resources/stacks/HDP/2.6/services/stack_advisor.py  | 12 ++++++++++++
 2 files changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0593c879/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
index 58b528e..70a2cbe 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
@@ -23,4 +23,16 @@
     <description>When HA is enabled, the class to be used by Clients, AMs and NMs to
failover to the Active RM. It should extend org.apache.hadoop.yarn.client.RMFailoverProxyProvider</description>
     <on-ambari-upgrade add="false"/>
   </property>
+  <property>
+    <name>yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled</name>
+    <value>false</value>
+    <description>This property need to be set to make preemption can happen under a
fragmented cluster.</description>
+    <depends-on>
+      <property>
+        <type>yarn-site</type>
+        <name>yarn.resourcemanager.scheduler.monitor.enable</name>
+      </property>
+    </depends-on>
+    <on-ambari-upgrade add="false"/>
+  </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/0593c879/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
index e6ebd6f..969c3dd 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
@@ -138,6 +138,18 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
         elif superset_database_type == "postgresql":
             putSupersetProperty("SUPERSET_DATABASE_PORT", "5432")
 
+  def recommendYARNConfigurations(self, configurations, clusterData, services, hosts):
+    super(HDP26StackAdvisor, self).recommendYARNConfigurations(configurations, clusterData,
services, hosts)
+    putYarnSiteProperty = self.putProperty(configurations, "yarn-site", services)
+
+    if "yarn-site" in services["configurations"] and \
+                    "yarn.resourcemanager.scheduler.monitor.enable" in services["configurations"]["yarn-site"]["properties"]:
+      scheduler_monitor_enabled = services["configurations"]["yarn-site"]["properties"]["yarn.resourcemanager.scheduler.monitor.enable"]
+      if scheduler_monitor_enabled.lower() == 'true':
+        putYarnSiteProperty('yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled',
"true")
+      else:
+        putYarnSiteProperty('yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled',
"false")
+
   def getMetadataConnectionString(self, database_type):
       driverDict = {
           'mysql': 'jdbc:mysql://{0}:{2}/{1}?createDatabaseIfNotExist=true',


Mime
View raw message