[
https://issues.apache.org/jira/browse/MRUNIT-158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500889#comment-13500889
]
Patrick Hunt commented on MRUNIT-158:
-------------------------------------
Don't get me wrong here, I see the issues you are mentioning. However my
context was that of a user of mrunit. They (me in this case) are trying to
determine why a test was failing. As far as I could see there was no easy way
to do that. Saying not to use MapWritable is not acceptable, there may be a
perfectly valid reason for the user to do so, mrunit should support this case.
Looks like part of this was addressed in 0.23?
https://issues.apache.org/jira/browse/HADOOP-7153 (I was running Hadoop code
after this fix went in, so I had the equals/hashcode fixed, so really just the
display of why the test failed was missing). Perhaps a jira should be created
for Hadoop to add toString method to MapWritable?
Looking for this problem and printing a warning seems reasonable, however it
would be nicer if mrunit could also provide some help in determining why the
test is failing. Perhaps there is a way to simply provide the "output" to the
user, so that they could extract additional information from that result? For
example in my case if I could get access to the "output" I could trying
iterating the entries and printing those...
> withOutput doesn't generate useful information with MapWritable on error
> ------------------------------------------------------------------------
>
> Key: MRUNIT-158
> URL: https://issues.apache.org/jira/browse/MRUNIT-158
> Project: MRUnit
> Issue Type: Improvement
> Affects Versions: 0.9.0
> Reporter: Patrick Hunt
> Priority: Minor
>
> Using withOutput generates the following, notice that the hashcode is printed
> rather than some useful detail as to the content of the maps:
> Nov 9, 2012 2:40:01 PM org.apache.hadoop.mrunit.TestDriver logError
> SEVERE: Missing expected output (null-0, org.apache.hadoop.io.MapWritable@e1)
> at position 0.
> Nov 9, 2012 2:40:01 PM org.apache.hadoop.mrunit.TestDriver logError
> SEVERE: Received unexpected output (null-0,
> org.apache.hadoop.io.MapWritable@2059) at position 0.
--
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