[
https://issues.apache.org/jira/browse/MRUNIT-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13480200#comment-13480200
]
Carlos Espinoza commented on MRUNIT-66:
---------------------------------------
I've also tried driver.run() as opposed to driver.runTest() so that I can
validate the output myself, but it fails with
java.lang.NullPointerException
at org.apache.hadoop.mrunit.Serialization.copy(Serialization.java:52)
at org.apache.hadoop.mrunit.Serialization.copy(Serialization.java:81)
at
org.apache.hadoop.mrunit.mock.MockOutputCollector.deepCopy(MockOutputCollector.java:45)
at
org.apache.hadoop.mrunit.mock.MockOutputCollector.collect(MockOutputCollector.java:54)
...
This is because the mapper returns a null key because it expects that there
will be no reducer. Again, Hadoop does not have a problem with this.
>From the API, the run function should behave as follows:
Runs the test but returns the result set instead of validating it (ignores any
addOutput(), etc calls made before this)
Seems to me like MRUnit should return the output.
> null input checks and behavior on no input to a driver are inconsistent
> -----------------------------------------------------------------------
>
> Key: MRUNIT-66
> URL: https://issues.apache.org/jira/browse/MRUNIT-66
> Project: MRUnit
> Issue Type: Improvement
> Affects Versions: 0.8.1
> Reporter: Jim Donofrio
> Assignee: Jim Donofrio
> Priority: Minor
> Fix For: 0.9.0
>
>
> the MapDriver class does not allow null input values if using setInput(Pair)
> but does allow null input if using setInputKey, setInputValue, or
> setInput(key, value)
> Also the MapDriver, ReduceDriver classes will throw null pointer exceptions
> with no input while the MapReduceDriver and Pipeline classes will just log
> warnings
--
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