incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vik...@apache.org
Subject svn commit: r1347247 - in /incubator/ambari/branches/ambari-186: CHANGES.txt hmc/php/util/selectNodes.php
Date Thu, 07 Jun 2012 01:07:16 GMT
Author: vikram
Date: Thu Jun  7 01:07:16 2012
New Revision: 1347247

URL: http://svn.apache.org/viewvc?rev=1347247&view=rev
Log:
AMBARI-441. Add ganglia monitor to all the hosts including collector. (Contributed by Mahadev)

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

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347247&r1=1347246&r2=1347247&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Thu Jun  7 01:07:16 2012
@@ -6,6 +6,8 @@ characters wide.
 
 Release 0.1.x - unreleased
 
+  AMBARI-441. Add ganglia monitor to all the hosts including collector. (Mahadev via Vikram)
+
   AMBARI-440. Keep the touch file for NN format in /var/run rather than /etc/conf. (Mahadev
via Vikram)
 
   AMBARI-439. Gmetad start fails sometimes. (Ramya via Vikram)

Modified: incubator/ambari/branches/ambari-186/hmc/php/util/selectNodes.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/util/selectNodes.php?rev=1347247&r1=1347246&r2=1347247&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/util/selectNodes.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/util/selectNodes.php Thu Jun  7 01:07:16
2012
@@ -159,9 +159,8 @@ class SelectNodes {
       $db->addHostsToComponent($clusterName, "HBASE_REGIONSERVER", $hostlist, "ASSIGNED",
"");
     }
     if (array_key_exists("GANGLIA", $services)) {
-      $hosts = $this->getExcludeHosts($hostlist, array($gangliaMaster));
       if (sizeof($hosts) > 0) {
-        $db->addHostsToComponent($clusterName, "GANGLIA_MONITOR", $hosts, "ASSIGNED",
"");
+        $db->addHostsToComponent($clusterName, "GANGLIA_MONITOR", $hostlist, "ASSIGNED",
"");
       }
     }
   }
@@ -288,16 +287,15 @@ class SelectNodes {
     }
     /** make sure ganglia is added to all the masters **/
     $this->logger->log_debug("Host for Gangalia Master $gangliaMaster");
+    $masterHosts = array();
     foreach($masterToHost as $componentName=>$hostNames) {
-      $masterHosts = array();
       foreach($hostNames as $hostName) {
-        if ($hostName != $gangliaMaster) {
-          array_push($masterHosts, $hostName);
-          $this->logger->log_debug("Adding host $hostName for GANGLIA_MONITOR");
-        }
+        array_push($masterHosts, $hostName);
+        $this->logger->log_debug("Adding host $hostName for GANGLIA_MONITOR");
       }
-      $db->addHostsToComponent($clusterName, "GANGLIA_MONITOR", $masterHosts, "ASSIGNED",
"");
     }
+    $db->addHostsToComponent($clusterName, "GANGLIA_MONITOR", $masterHosts, "ASSIGNED",
"");
+
     // add DASHBOARD component
     $dashhostName = strtolower(exec('hostname -f'));
     $db->addHostsToComponent($clusterName, "DASHBOARD" , array($dashhostName), "ASSIGNED",
"");



Mime
View raw message