[
https://issues.apache.org/jira/browse/PIG-2645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13561025#comment-13561025
]
Alan Gates commented on PIG-2645:
---------------------------------
Reviewing this patch
> PigSplit does not handle the case where SerializationFactory returns null
> -------------------------------------------------------------------------
>
> Key: PIG-2645
> URL: https://issues.apache.org/jira/browse/PIG-2645
> Project: Pig
> Issue Type: Bug
> Components: impl
> Affects Versions: 0.10.0
> Reporter: Alex Levenson
> Labels: patch
> Attachments: patch_2645.patch, PIG-2645.patch
>
>
> In PigSplit.java, line 254:
> {code}
> SerializationFactory sf = new SerializationFactory(conf);
> Serializer s = sf.getSerializer(wrappedSplits[0].getClass());
> s.open((OutputStream) os);
> {code}
> sf.getSerializer returns null when it cannot find a serializer for a given
> object. Instead of handling this properly, a NPE is thrown when s.open() is
> called.
> This is easy to encounter when creating a custom InputSplit from the
> mapreduce package which is an abstract class that DOES NOT implement Writable.
> However it's easy to miss because InputSplit from the mapred package is an
> interface that extends Writable, and InputSplits often both extend and
> implement both the new and old InputSplit abstract class and interface
> (thereby becoming Writable).
--
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