[
https://issues.apache.org/jira/browse/HADOOP-10120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13829238#comment-13829238
]
Andrew Wang commented on HADOOP-10120:
--------------------------------------
Thanks for the pointer Steve, that DurationStats class is basically what I want
to do, except sliding.
For failures, I'd personally first try to do the simple-stupid thing and log
all of them. Hopefully failures aren't such a common occurrence that this is an
issue :)
My current issue for this JIRA though is getting metrics2 to output something
that is not a Number. I really want to output a Long[] or Double[], and I could
see utility in String too. JMXJsonServlet seems like it'll handle it okay, but
this might not be a compatible change since Number is part of
{{AbstractMetric}}.
> Additional sliding window metrics
> ---------------------------------
>
> Key: HADOOP-10120
> URL: https://issues.apache.org/jira/browse/HADOOP-10120
> Project: Hadoop Common
> Issue Type: New Feature
> Components: metrics
> Affects Versions: 2.2.0
> Reporter: Andrew Wang
> Assignee: Andrew Wang
>
> For HDFS-5350 we'd like to report the last few fsimage transfer times as a
> health metric. This would mean (for example) a sliding window of the last 10
> transfer times, when it was last updated, the total count. It'd be nice to
> have a metrics class that did this.
> It'd also be interesting to have some kind of time-based sliding window for
> statistics like counts and averages. This would let us answer questions like
> "how many RPCs happened in the last 10s? minute? 5 minutes? 10 minutes?".
> Commutative metrics like counts and averages are easy to aggregate in this
> fashion.
--
This message was sent by Atlassian JIRA
(v6.1#6144)