ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [2/2] git commit: AMBARI-8020. /recommendations API mising "tez.am.java.opts" (aonishuk)
Date Wed, 29 Oct 2014 16:26:36 GMT
AMBARI-8020. /recommendations API mising "tez.am.java.opts"  (aonishuk)


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

Branch: refs/heads/branch-1.7.0
Commit: b1b36a16e44f8eaa8d17b32d588d6cd4608412a8
Parents: 6f27129
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Wed Oct 29 18:26:25 2014 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Wed Oct 29 18:26:25 2014 +0200

----------------------------------------------------------------------
 .../src/main/resources/stacks/HDP/2.2/services/stack_advisor.py  | 4 ++++
 .../src/test/python/stacks/2.2/common/test_stack_advisor.py      | 3 +++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b1b36a16/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
index aa4fa46..71b7695 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
@@ -36,6 +36,9 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
   def recommendTezConfigurations(self, configurations, clusterData):
     putTezProperty = self.putProperty(configurations, "tez-site")
     putTezProperty("tez.am.resource.memory.mb", int(clusterData['amMemory']) * 2 if int(clusterData['amMemory'])
< 3072 else int(clusterData['amMemory']))
+    putTezProperty("tez.am.java.opts",
+                   "-server -Xmx" + str(int(0.8 * clusterData["amMemory"]))
+                   + "m -Djava.net.preferIPv4Stack=true -XX:+UseNUMA -XX:+UseParallelGC")
 
     taskResourceMemory = clusterData['mapMemory'] if clusterData['mapMemory'] > 2048 else
int(clusterData['reduceMemory'])
     taskResourceMemory = min(clusterData['containers'] * clusterData['ramPerContainer'],
taskResourceMemory)
@@ -55,6 +58,7 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
 
   def validateTezConfigurations(self, properties, recommendedDefaults, configurations):
     validationItems = [ {"config-name": 'tez.am.resource.memory.mb', "item": self.validatorLessThenDefaultValue(properties,
recommendedDefaults, 'tez.am.resource.memory.mb')},
+                        {"config-name": 'tez.am.java.opts', "item": self.validateXmxValue(properties,
recommendedDefaults, 'tez.am.java.opts')},
                         {"config-name": 'tez.task.resource.memory.mb', "item": self.validatorLessThenDefaultValue(properties,
recommendedDefaults, 'tez.task.resource.memory.mb')},
                         {"config-name": 'tez.runtime.io.sort.mb', "item": self.validatorLessThenDefaultValue(properties,
recommendedDefaults, 'tez.runtime.io.sort.mb')},
                         {"config-name": 'tez.runtime.unordered.output.buffer.size-mb', "item":
self.validatorLessThenDefaultValue(properties, recommendedDefaults, 'tez.runtime.unordered.output.buffer.size-mb')},]

http://git-wip-us.apache.org/repos/asf/ambari/blob/b1b36a16/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
index 06c476e..c5c31ee 100644
--- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
@@ -55,6 +55,7 @@ class TestHDP22StackAdvisor(TestCase):
       "tez-site": {
         "properties": {
           "tez.am.resource.memory.mb": "4000",
+          "tez.am.java.opts": "-server -Xmx1600m -Djava.net.preferIPv4Stack=true -XX:+UseNUMA
-XX:+UseParallelGC",
           "tez.task.resource.memory.mb": "768",
           "tez.runtime.io.sort.mb": "307",
           "tez.runtime.unordered.output.buffer.size-mb": "57"
@@ -77,6 +78,7 @@ class TestHDP22StackAdvisor(TestCase):
       "tez-site": {
         "properties": {
           "tez.am.resource.memory.mb": "3100",
+          "tez.am.java.opts": "-server -Xmx2480m -Djava.net.preferIPv4Stack=true -XX:+UseNUMA
-XX:+UseParallelGC",
           "tez.task.resource.memory.mb": "768",
           "tez.runtime.io.sort.mb": "307",
           "tez.runtime.unordered.output.buffer.size-mb": "57"
@@ -99,6 +101,7 @@ class TestHDP22StackAdvisor(TestCase):
       "tez-site": {
         "properties": {
           "tez.am.resource.memory.mb": "4000",
+          "tez.am.java.opts": "-server -Xmx1600m -Djava.net.preferIPv4Stack=true -XX:+UseNUMA
-XX:+UseParallelGC",
           "tez.task.resource.memory.mb": "760",
           "tez.runtime.io.sort.mb": "304",
           "tez.runtime.unordered.output.buffer.size-mb": "57"


Mime
View raw message