You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vi...@apache.org on 2012/06/07 03:46:15 UTC

svn commit: r1347281 - in /incubator/ambari/branches/ambari-186: CHANGES.txt hmc/php/util/suggestProperties.php

Author: vikram
Date: Thu Jun  7 01:46:15 2012
New Revision: 1347281

URL: http://svn.apache.org/viewvc?rev=1347281&view=rev
Log:
AMBARI-465. Fix suggestions for Map Red Child java opts. (Contributed by Mahadev)

Modified:
    incubator/ambari/branches/ambari-186/CHANGES.txt
    incubator/ambari/branches/ambari-186/hmc/php/util/suggestProperties.php

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347281&r1=1347280&r2=1347281&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Thu Jun  7 01:46:15 2012
@@ -6,6 +6,8 @@ characters wide.
 
 Release 0.1.x - unreleased
 
+  AMBARI-465. Fix suggestions for Map Red Child java opts. (Mahadev via Vikram)
+
   AMBARI-461. Uninstall shoud stop nagios service first before stopping other services (Hitesh via Vikram)
   
   AMBARI-464. Auto refresh should be applicable to all the service tabs (Suhas via Vikram)

Modified: incubator/ambari/branches/ambari-186/hmc/php/util/suggestProperties.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/util/suggestProperties.php?rev=1347281&r1=1347280&r2=1347281&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/util/suggestProperties.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/util/suggestProperties.php Thu Jun  7 01:46:15 2012
@@ -62,6 +62,18 @@ class SuggestProperties {
     return $normalizedMem;
   }
 
+  function allocateHeapSizeWithMax($componentName, $hostRoles, $hostInfoMap,
+      $allHostsToComponents, $is32bit) {
+    $heapSizeT = $this->allocateHeapSizeForDaemon($componentName, $hostRoles, $hostInfoMap,
+        $allHostsToComponents, $is32bit);
+    if ($heapSizeT > 3072) {
+      $heapSize = 3072;
+    }
+
+    $this->logger->log_info("Calculating Maxed Heap Size For ".$componentName ." $heapSizeT" );
+    return $heapSizeT; 
+  }
+
   function getMaxHeapSizeForDaemon($componentName, $hostRoles, $hostInfoMap,
       $allHostsToComponents, $is32bit) {
     $this->logger->log_info("Calculating Max Heap Size For ".$componentName);
@@ -262,7 +274,10 @@ class SuggestProperties {
     // limit on the host
     $heapSize = $this->allocateHeapSizeForDaemon("TASKTRACKER", $hostRoles,
         $hostInfoMap, $allHostsToComponents, TRUE);
-    $result["configs"]["mapred_child_java_opts_sz"] = $heapSize;
+    $heapSizeWithMax = $this->allocateHeapSizeWithMax("TASKTRACKER", $hostRoles,
+        $hostInfoMap, $allHostsToComponents, TRUE);
+    $this->logger->log_info("Maxed Heap Size for MR Child opts ".$heapSizeWithMax);
+    $result["configs"]["mapred_child_java_opts_sz"] = $heapSizeWithMax;
 
     if (array_key_exists("HBASE", $services)) {
       $heapSize = $this->allocateHeapSizeForDaemon("HBASE_REGIONSERVER", $hostRoles,