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

David Bowen commented on HADOOP-954:
------------------------------------


A bigger question here is whether this simplified interface is
appropriate even for dfs and mapred.  There are a couple of issues:

   1. Most or all of the data being reported should be using counters
      rather than gauges.  This would allow us to get graphs of things
      like bytes-read per second, as opposed to simply a graph of the
      cumulative number of bytes read (which will soon overflow).
   2. The current code is a little inefficient if used in inner loops. 
      Each call to the report method (for a single metric) will cause
      all the metrics in that record to be copied from the MetricsRecord
      into the library's internal table.  Also, the report method cannot
      be easily modified to work with counters, since it would be
      necessary to reinitialize the record every time.

The preferable way to use the API is to have each "event" (counter
increment) simply increment a counter, and to use a call-back to report
the counter values to the metrics library periodically (every 5 seconds
in our case).

- David



> Metrics should offer complete set of static report methods or none at all
> -------------------------------------------------------------------------
>
>                 Key: HADOOP-954
>                 URL: https://issues.apache.org/jira/browse/HADOOP-954
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: metrics
>    Affects Versions: 0.10.1
>            Reporter: Nigel Daley
>         Assigned To: David Bowen
>            Priority: Minor
>
> org.apache.hadoop.metrics.Metrics currently has one report method.  I should 
> either have report methods for all underlying MetricsRecord or no report 
> methods at all.

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

Reply via email to