You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Michael Bieniosek (JIRA)" <ji...@apache.org> on 2007/03/27 21:49:32 UTC

[jira] Commented: (HADOOP-1163) Ganglia metrics reporting is misconfigured

    [ https://issues.apache.org/jira/browse/HADOOP-1163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484564 ] 

Michael Bieniosek commented on HADOOP-1163:
-------------------------------------------

My patch (I can't attach in the standard way since this issue is still open):

--- src/java/org/apache/hadoop/metrics/ganglia/GangliaContext.java      (revision 522712)
+++ src/java/org/apache/hadoop/metrics/ganglia/GangliaContext.java      (working copy)
@@ -122,19 +122,6 @@
     public void emitRecord(String contextName, String recordName, OutputRecord outRec) 
         throws IOException
     {
-        
-        // metric name formed from record name and tag values
-        StringBuffer nameBuf = new StringBuffer(recordName);
-        // for (String tagName : outRec.getTagNames()) {
-        Iterator tagIt = outRec.getTagNames().iterator();
-        while (tagIt.hasNext()) {
-            String tagName = (String) tagIt.next();
-            nameBuf.append('.');
-            nameBuf.append(outRec.getTag(tagName));
-        }
-        nameBuf.append('.');
-        String namePrefix = new String(nameBuf);
-        
         // emit each metric in turn
         // for (String metricName : outRec.getMetricNames()) {
         Iterator metricIt = outRec.getMetricNames().iterator();
@@ -142,9 +129,8 @@
             String metricName = (String) metricIt.next();
             Object metric = outRec.getMetric(metricName);
             String type = (String) typeTable.get(metric.getClass());
-            emitMetric(namePrefix + metricName, type, metric.toString());
+            emitMetric(metricName, type, metric.toString());
         }
-        
     }
     
     private void emitMetric(String name, String type,  String value) 


> Ganglia metrics reporting is misconfigured
> ------------------------------------------
>
>                 Key: HADOOP-1163
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1163
>             Project: Hadoop
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.12.1
>         Environment: ganglia-3.0.3
>            Reporter: Michael Bieniosek
>            Priority: Minor
>
> In hadoop-metrics.properties, I set mapred.class=org.apache.hadoop.metrics.ganglia.GangliaContext.
> If I then get the gmond xml feed from the gmond server, I get this:
> <METRIC NAME="load_one" VAL="1.04" TYPE="float" UNITS="" TN="28" TMAX="70" DMAX="0" SLOPE="both" SOURCE="gmond"/>
> ...
> <METRIC NAME="datanode.myhostname.bytes_read" VAL="657927" TYPE="int32" UNITS="" TN="5696" TMAX="60" DMAX="0" SLOPE="both" SOURCE="gmetric"/>
> Because the bytes_read metric has the datanode.hostname prefix, it will not aggregate with metrics from other hosts properly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.