[ 
https://issues.apache.org/jira/browse/PIG-2645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Gates updated PIG-2645:
----------------------------

    Assignee: Shami B
    
> 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
>            Assignee: Shami B
>              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

Reply via email to