[
https://issues.apache.org/jira/browse/HADOOP-7627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13122177#comment-13122177
]
Todd Lipcon commented on HADOOP-7627:
-------------------------------------
Hi Luke. I tried to make this change, but it doesn't work. The issue I'm
getting is this:
[ERROR]
/home/todd/git/hadoop-common/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/MetricsAsserts.java:[189,26]
cannot find symbol
[ERROR] symbol : method addGauge(org.apache.hadoop.metrics2.MetricsInfo,T)
[ERROR] location: class org.apache.hadoop.metrics2.MetricsRecordBuilder
Upon thinking about it, this makes sense - there's no type qualification on T,
so there's no way it can resolve this method call to one of the specific
overloads of addGauge in MetricsRecordBuilder. It would work with C++
templates, but not Java generics. So, I think the original approach is the best
we can do.
> Improve MetricsAsserts to give more understandable output on failure
> --------------------------------------------------------------------
>
> Key: HADOOP-7627
> URL: https://issues.apache.org/jira/browse/HADOOP-7627
> Project: Hadoop Common
> Issue Type: Improvement
> Components: metrics, test
> Affects Versions: 0.23.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Minor
> Attachments: hadoop-7627.txt
>
>
> In developing a test case that uses MetricsAsserts, I had two issues:
> 1) the error output in the case that an assertion failed does not currently
> give any information as to the _actual_ value of the metric
> 2) there is no way to retrieve the metric variable (eg to assert that the sum
> of a metric over all DNs is equal to some value)
> This JIRA is to improve this test class to fix the above issues.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira