hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Lipcon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-7627) Improve MetricsAsserts to give more understandable output on failure
Date Mon, 12 Sep 2011 22:35:08 GMT

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

Todd Lipcon commented on HADOOP-7627:
-------------------------------------

For example, if I break one of the asserts in TestNameNodeMetrics to assert the wrong value,
I get the following test failure:
{noformat}
Argument(s) are different! Wanted:
metricsRecordBuilder.addCounter(
    Info with name=FilesRenamed,
    2
);
-> at org.apache.hadoop.test.MetricsAsserts.assertCounter(MetricsAsserts.java:186)
Actual invocation has different arguments:
metricsRecordBuilder.addCounter(
    MetricsInfoImpl{name=CreateFileOps, description=CreateFileOps},
    2
);
{noformat}
The "actual" result has nothing to do with the metric in question.

If I break the metric name to be incorrect (eg change FilesRenamed to FilesRenameXXXX) I get
the same error trace.

> 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
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message