incubator-crunch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kiyan Ahmadizadeh (JIRA)" <>
Subject [jira] [Commented] (CRUNCH-57) Add a length function to PCollection
Date Wed, 05 Sep 2012 22:18:08 GMT


Kiyan Ahmadizadeh commented on CRUNCH-57:

Taking a look at the FlumeJava paper (this copy:,
it looks like the answer to this is the PObject, which acts a bit like a Future, although
PObjects defer the start of computation until the object is accessed, while a Java Future
begins computation as soon as the Future is constructed and blocks on a call to get() if the
Future has yet to complete.  

It seems like the PObject concept would be generally useful.  Min and max on PCollection could
be changed to return a PObject, as could this length method, etc.

Perhaps we should make another ticket for implementing PObject.  Thoughts?
> Add a length function to PCollection
> ------------------------------------
>                 Key: CRUNCH-57
>                 URL:
>             Project: Crunch
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 0.3.0
>            Reporter: Kiyan Ahmadizadeh
>            Assignee: Josh Wills
>         Attachments: CRUNCH-57.patch
> Sometimes it's useful and interesting to compute the number of elements in a PCollection.
> For example, suppose there was an initial PCollection that was then filtered into another.
 If I'm interested in how many elements of the original PCollection matched the filter, I'll
have to write extra code to compute this.
> PCollections should have a length method that, when called, computes the number of elements
in the PCollection and returns the result. 

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:

View raw message