[
https://issues.apache.org/jira/browse/CRUNCH-468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14117580#comment-14117580
]
Josh Wills commented on CRUNCH-468:
-----------------------------------
Yeah, so this doesn't happen with typedCollectionOf. It seems like the right
thing to do would be to have collectionOf attempt to infer a PType from the
class of the object it contains by default, and we could have a method on
MemPipeline that would allow you to control what the default PTypeFamily was--
Writable is probably the right choice.
> MemPipeline.collectionOf() leads to NPE in PCollection.length()
> ---------------------------------------------------------------
>
> Key: CRUNCH-468
> URL: https://issues.apache.org/jira/browse/CRUNCH-468
> Project: Crunch
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.10.0
> Reporter: Jeremy Beard
> Assignee: Josh Wills
>
> MemPipeline.collectionOf() creates a PCollection with a null PTypeFamily.
> When PCollection.length() is run it uses the PTypeFamily of the PCollection
> to serialize the running count of the records, which leads to a NPE for
> PCollections created as above.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)