[
https://issues.apache.org/jira/browse/MRUNIT-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13237872#comment-13237872
]
Jim Donofrio edited comment on MRUNIT-66 at 3/25/12 3:10 PM:
-------------------------------------------------------------
Is it true that null should never be a legitimate key or value as input output
to a mapper or reducer?
I guess it is possible if someone wrote a custom RecordReader that could pass
null to a custom mapper or a RecordWriter that would accept null from a custom
mapper or reducer. However, I dont think this would be a good practice, since
that RecordReader would be incompatible with any other mapper/reducer and those
mappers/reducers would be incompatible with any other RecordWriter.
I think I would be ok then in not allowing null as input to any of our public
methods including the Pair class
was (Author: jdonofrio):
Is it true that null should never be a legitimate key or value as input
output to a mapper or reducer?
> 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: 1.0.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:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira