mrunit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ximo Guanter (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MRUNIT-180) Being able to use a comparator on runTest
Date Tue, 02 Apr 2013 06:57:15 GMT

     [ https://issues.apache.org/jira/browse/MRUNIT-180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ximo Guanter updated MRUNIT-180:
--------------------------------

    Attachment: MRUNIT-180-2.patch

Hello,

After some usability testing, I have slightly improved the patch (MRUNIT-180-2.patch) by adding
explicit setters and getters for the comparators instead of overloading the runTest() function.
Both patches are backwards compatible, since they don't break the interface.

With regard to the changes in TestMapReduceDriver: changing the Map type in buildPositionMap
from HashMap to TreeMap changes the order in which errors are reported. The tests were previously
asserting the full error string, which implies it was also expecting the order of the errors
not to change (it was expecting the error for position 1 to be reported before the error for
position 0). This is not ideal since the order of the errors doesn't really matter to the
user, and the order of errors changed with the change of Map type, so the asserts have been
rewritten where necessary so they assert each individual error, but not the relative order
of apprearance between them.
                
> Being able to use a comparator on runTest
> -----------------------------------------
>
>                 Key: MRUNIT-180
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-180
>             Project: MRUnit
>          Issue Type: Improvement
>    Affects Versions: 0.9.0
>            Reporter: Ximo Guanter
>            Assignee: Ximo Guanter
>            Priority: Minor
>             Fix For: 1.1.0
>
>         Attachments: MRUNIT-180-2.patch, MRUNIT-180.patch
>
>
> Sometimes using withOutput and runTest is not possible if the .equals method is not the
correct way to compare equality. This is especially true for Mapper and Reducers that return
doubles or structure with doubles in them, since there is no way to specify a desired error
tolerance for the result.
> Being able to specify a Comparator for the key and value types enabled the usage of runTest
for these cases.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message