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 00:42:12 UTC
svn commit: r1347187 - in /incubator/ambari/branches/ambari-186: CHANGES.txt
hmc/php/util/sequentialScriptRunner.php
Author: vikram
Date: Wed Jun 6 22:42:12 2012
New Revision: 1347187
URL: http://svn.apache.org/viewvc?rev=1347187&view=rev
Log:
AMBARI-403. Show fixed count of total nodes during all bootstrap phases (Contributed by Hitesh)
Modified:
incubator/ambari/branches/ambari-186/CHANGES.txt
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=1347187&r1=1347186&r2=1347187&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Wed Jun 6 22:42:12 2012
@@ -6,6 +6,8 @@ characters wide.
Release 0.1.x - unreleased
+ AMBARI-403. Show fixed count of total nodes during all bootstrap phases (Hitesh via Vikram)
+
AMBARI-325. MR vmem config options are useless without an option to enable/disable memory-monitoring (Vinod via Vikram)
AMBARI-402. Completing successful add node takes one to initialize cluster page starting from scratch (Varun via Vikram)
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=1347187&r1=1347186&r2=1347187&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 22:42:12 2012
@@ -19,13 +19,13 @@ include_once '../util/util.php';
$logger = new HMCLogger("sequentialScriptExecutor");
$dbHandle = new HMCDBAccessor($GLOBALS["DB_PATH"]);
-function updateProgressForStage($clusterName, $rootTxnId, $orchestratorTxnId, $mySubTxnId, $operationName) {
+function updateProgressForStage($clusterName, $rootTxnId, $orchestratorTxnId,
+ $mySubTxnId, $operationName, $numTotalNodes) {
global $logger, $dbHandle, $stagesInfo;
$clusterDir = getClusterDir($clusterName);
$commandOutputDir = $clusterDir . $operationName . "/";
- $numTotalNodes = 0;
$numNodesFailed = 0;
$numNodesSucceeded = 0;
$additionalInfo = array();
@@ -42,7 +42,6 @@ function updateProgressForStage($cluster
}
$nodeName = basename($entry, ".out");
- $numTotalNodes++;
$doneFile = $commandOutputDir . $nodeName . ".done";
if (file_exists($doneFile)) {
// Read the contents of the done-file
@@ -180,7 +179,8 @@ foreach ($stagesInfo as $stage => $stage
return;
}
// If the host list is empty, say because of failures in previous stage, no point carrying it on..
- if (count($hosts) == 0) {
+ $hostCount = count($hosts);
+ if ($hostCount == 0) {
$logger->log_info("Skipping stage " . $stage . " as no valid hosts available");
continue; // so that all stages can get marked as failures
}
@@ -227,17 +227,17 @@ foreach ($stagesInfo as $stage => $stage
$currentStatus = $allSubTransactionsInfoResult["subTxns"][$mySubTxnId]["opStatus"];
//$logger->log_debug(" sequentialScriptExecutors sub txns " . json_encode($allSubTransactionsInfoResult));
- if ($currentStatus != $successStatus && $currentStatus != $errorStatus
- && $currentStatus != $totalFailedStatus) {
- updateProgressForStage($clusterName, $rootTxnId,
- $orchestratorTxnId, $mySubTxnId, $stage);
+ if ($currentStatus != $successStatus && $currentStatus != $errorStatus
+ && $currentStatus != $totalFailedStatus) {
+ updateProgressForStage($clusterName, $rootTxnId,
+ $orchestratorTxnId, $mySubTxnId, $stage, $hostCount);
}
//$logger->log_debug("Status we are seeing: " . $currentStatus . " txnId: " . $orchestratorTxnId . " subTxnId " . $mySubTxnId);
}
// Just in case, the command finished too fast and the while loop is skipped.
- updateProgressForStage($clusterName, $rootTxnId, $orchestratorTxnId, $mySubTxnId, $stage);
+ updateProgressForStage($clusterName, $rootTxnId, $orchestratorTxnId, $mySubTxnId, $stage, $hostCount);
$logger->log_debug("Came out of the launch for stage " . $currentStage . "\n");
unset($subTxn);