Browse Source

AMBARI-224: sequentialScriptRunner.php logging in a tight loop by Jitendra Pandey

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/ambari-186@1338508 13f79535-47bb-0310-9956-ffa450edef68
Suhas 13 years ago
parent
commit
09be642e47
2 changed files with 5 additions and 3 deletions
  1. 2 0
      CHANGES.txt
  2. 3 3
      hmc/php/util/sequentialScriptRunner.php

+ 2 - 0
CHANGES.txt

@@ -2,6 +2,8 @@ Ambari Change log
 
 Release 0.x.x - unreleased
 
+  AMBARI-224. sequentialScriptRunner.php logging in a tight loop. (Jitendra Pandey via vgogate)
+
   AMBARI-223. Add troubleshoot link in the Alerts table to provide documentation for debugging/resolving the alerts (vgogate)
 
   AMBARI-222. Remove the word alert from all the Nagios alerts descriptions. (vgogate)

+ 3 - 3
hmc/php/util/sequentialScriptRunner.php

@@ -216,7 +216,7 @@ foreach ($stagesInfo as $stage => $stageInfo) {
   $currentStatus = $allSubTransactionsInfoResult["subTxns"][$mySubTxnId]["opStatus"];
   while ( $currentStatus != $successStatus && $currentStatus != $errorStatus
     && $currentStatus != $totalFailedStatus) {
-//        sleep(1);
+        sleep(1);
 
         $allSubTransactionsInfoResult = $dbHandle->getAllSubTransactionsInfo($clusterName, $orchestratorTxnId);
         if ($allSubTransactionsInfoResult["result"] != 0 ) {
@@ -226,14 +226,14 @@ foreach ($stagesInfo as $stage => $stageInfo) {
         }
         $currentStatus = $allSubTransactionsInfoResult["subTxns"][$mySubTxnId]["opStatus"];
 
-        $logger->log_debug(" sequentialScriptExecutors sub txns  " . json_encode($allSubTransactionsInfoResult));
+        //$logger->log_debug(" sequentialScriptExecutors sub txns  " . json_encode($allSubTransactionsInfoResult));
         if ($currentStatus != $successStatus && $currentStatus != $errorStatus 
         && $currentStatus != $totalFailedStatus) {
           updateProgressForStage($clusterName, $rootTxnId, 
             $orchestratorTxnId, $mySubTxnId, $stage);
         }
 
-        $logger->log_debug("Status we are seeing: " . $currentStatus . " txnId: " . $orchestratorTxnId . " subTxnId " . $mySubTxnId);
+        //$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.