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 01:17:18 UTC

svn commit: r1347201 - in /incubator/ambari/branches/ambari-186: CHANGES.txt hmc/db/schema.dump hmc/php/puppet/genmanifest/hostsConfig.php hmc/php/util/sequentialScriptRunner.php

Author: vikram
Date: Wed Jun  6 23:17:17 2012
New Revision: 1347201

URL: http://svn.apache.org/viewvc?rev=1347201&view=rev
Log:
AMBARI-529. Fix Advanced Config: HDFS reserved space is in bytes. Too many bytes to count. (Contributed by Hitesh)

Modified:
    incubator/ambari/branches/ambari-186/CHANGES.txt
    incubator/ambari/branches/ambari-186/hmc/db/schema.dump
    incubator/ambari/branches/ambari-186/hmc/php/puppet/genmanifest/hostsConfig.php
    incubator/ambari/branches/ambari-186/hmc/php/util/sequentialScriptRunner.php

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347201&r1=1347200&r2=1347201&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Wed Jun  6 23:17:17 2012
@@ -6,6 +6,8 @@ characters wide.
 
 Release 0.1.x - unreleased
 
+  AMBARI-529. Fix Advanced Config: HDFS reserved space is in bytes. Too many bytes to count. (Hitesh via Vikram)
+
   AMBARI-530. HMC UI shows undefined for nodes after single node install (Yusaku via Vikram)
 
   AMBARI-532. add ganglia monitor to all masters (Mahadev via Vikram)

Modified: incubator/ambari/branches/ambari-186/hmc/db/schema.dump
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/db/schema.dump?rev=1347201&r1=1347200&r2=1347201&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/db/schema.dump (original)
+++ incubator/ambari/branches/ambari-186/hmc/db/schema.dump Wed Jun  6 23:17:17 2012
@@ -268,7 +268,7 @@ INSERT OR REPLACE INTO "ConfigProperties
 INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "namenode_opt_newsize", "200", "NameNode new generation size", "Default size of Java new generation for NameNode (Java option -XX:NewSize)", "HDFS" , "", '{ "isPassword": false, "noDisplay": false, "reconfigurable": true, "displayType": "text", "unit":"MB" }' );
 
 -- maps to datanode_du_reserved in gscluster in bytes.
-INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "datanode_du_reserved", "1073741824", "Reserved space for HDFS", "Reserved space in bytes per volume", "HDFS" , "", '{ "isPassword": false, "noDisplay": false, "reconfigurable": true, "displayType": "text", "unit":"B" }' );
+INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "datanode_du_reserved", "1", "Reserved space for HDFS", "Reserved space in GB per volume", "HDFS" , "", '{ "isPassword": false, "noDisplay": false, "reconfigurable": true, "displayType": "text", "unit":"GB" }' );
 
 -- maps to dt_heapsize in gscluster in MB.
 INSERT OR REPLACE INTO "ConfigProperties" ( key, default_value, display_name, description, service_name, display_type, display_attributes ) VALUES ( "dtnode_heapsize", "1024", "DataNode maximum Java heap size", "Maximum Java heap size for DataNode (Java option -Xmx)", "HDFS" , "", '{ "isPassword": false, "noDisplay": false, "reconfigurable": true, "displayType": "text", "unit":"MB" }' );

Modified: incubator/ambari/branches/ambari-186/hmc/php/puppet/genmanifest/hostsConfig.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/puppet/genmanifest/hostsConfig.php?rev=1347201&r1=1347200&r2=1347201&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/puppet/genmanifest/hostsConfig.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/puppet/genmanifest/hostsConfig.php Wed Jun  6 23:17:17 2012
@@ -78,6 +78,10 @@ class HostsConfigManifest {
            ($key == "snappy_enabled") || 
            ($key == "wipeoff_data") ) {
         $manifest = $manifest . $value . "\n";
+      } else if ($key == "datanode_du_reserved") {
+        // convert GB to bytes and round off to whole number
+        $newVal = round(intval($value) * 1024 * 1024 * 1024);
+        $manifest = $manifest . "\"" .  $newVal . "\"\n";
       } else {
         $manifest = $manifest . "\"" .  $value . "\"\n";
       }

Modified: incubator/ambari/branches/ambari-186/hmc/php/util/sequentialScriptRunner.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/util/sequentialScriptRunner.php?rev=1347201&r1=1347200&r2=1347201&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/util/sequentialScriptRunner.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/util/sequentialScriptRunner.php Wed Jun  6 23:17:17 2012
@@ -30,8 +30,12 @@ function updateProgressForStage($cluster
   $numNodesSucceeded = 0;
   $additionalInfo = array();
 
+  $foundDir = FALSE;
   if (is_dir($commandOutputDir) && $dirHandle = opendir($commandOutputDir)) {
-    $logger->log_debug($commandOutputDir . " exists finally ");
+    if (!$foundDir) {
+      $logger->log_debug($commandOutputDir . " exists finally ");
+    }
+    $foundDir = TRUE;
     while (false !== ($entry = readdir($dirHandle))) {
       if ($entry == "." || $entry == "..") {
         continue;