Updated Branches:
  refs/heads/branch-1.4.1 cb2c3c3fb -> 631aecc47

AMBARI-3476. Time-series data are not coming thru via the API on CentOS 5 
(graphs are being shown in Ganglia).


Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/631aecc4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/631aecc4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/631aecc4

Branch: refs/heads/branch-1.4.1
Commit: 631aecc47b8121dd90967e86fe4ffe67b098a4fa
Parents: cb2c3c3
Author: Mahadev Konar <[email protected]>
Authored: Mon Oct 7 18:53:42 2013 -0700
Committer: Mahadev Konar <[email protected]>
Committed: Mon Oct 7 18:54:35 2013 -0700

----------------------------------------------------------------------
 .../src/main/puppet/modules/hdp-ganglia/files/rrd.py   | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/631aecc4/ambari-agent/src/main/puppet/modules/hdp-ganglia/files/rrd.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-ganglia/files/rrd.py 
b/ambari-agent/src/main/puppet/modules/hdp-ganglia/files/rrd.py
index 2656dd7..2e3f07a 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-ganglia/files/rrd.py
+++ b/ambari-agent/src/main/puppet/modules/hdp-ganglia/files/rrd.py
@@ -139,9 +139,20 @@ if "pt" in queryString:
   pointInTime = True
 else:
   pointInTime = False
+  
+def _walk(*args, **kwargs):
+ 
+  for root,dirs,files in os.walk(*args, **kwargs):
+    for dir in dirs:
+      qualified_dir = os.path.join(root,dir)
+      if os.path.islink(qualified_dir):
+        for x in os.walk(qualified_dir, **kwargs):
+          yield x
+    yield (root, dirs, files)
+    
 
 for cluster in clusterParts:
-  for path, dirs, files in os.walk(rrdPath + cluster,followlinks=True):
+  for path, dirs, files in _walk(rrdPath + cluster):
     pathParts = path.split("/")
     if len(hostParts) == 0 or pathParts[-1] in hostParts:
       for file in files:

Reply via email to