HADOOP-7328. Improve the SerializationFactory functions.
Review Request #884 - Created June 11, 2011 and submitted
Since getSerialization() can possibly return a null, it is only right that getSerializer() and getDeserializer() usage functions do the same, instead of throwing up NPEs. Related issue to which this improvement is required: https://issues.apache.org/jira/browse/MAPREDUCE-2584
Existing SequenceFile serialization factory tests pass. The change is merely to make the functions return null instead of throwing an NPE within.
Posted (June 13, 2011, 6:23 p.m.)
Sorry if this is out of context, but is it really best to also return a null here? Shouldn't it check for null result from getSerialization(), then throw a (non-NPE) exception? Or do you prefer to do that check and throw at a higher level of the code?