Return-Path: X-Original-To: apmail-incubator-crunch-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-crunch-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 179CFD8BB for ; Wed, 5 Sep 2012 22:20:09 +0000 (UTC) Received: (qmail 18614 invoked by uid 500); 5 Sep 2012 22:20:08 -0000 Delivered-To: apmail-incubator-crunch-dev-archive@incubator.apache.org Received: (qmail 18564 invoked by uid 500); 5 Sep 2012 22:20:08 -0000 Mailing-List: contact crunch-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: crunch-dev@incubator.apache.org Delivered-To: mailing list crunch-dev@incubator.apache.org Received: (qmail 18443 invoked by uid 99); 5 Sep 2012 22:20:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2012 22:20:08 +0000 Date: Thu, 6 Sep 2012 09:20:08 +1100 (NCT) From: "Josh Wills (JIRA)" To: crunch-dev@incubator.apache.org Message-ID: <1630449337.41560.1346883608358.JavaMail.jiratomcat@arcas> In-Reply-To: <279054043.41247.1346878871463.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (CRUNCH-57) Add a length function to PCollection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CRUNCH-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449195#comment-13449195 ] Josh Wills commented on CRUNCH-57: ---------------------------------- +1 from me. > Add a length function to PCollection > ------------------------------------ > > Key: CRUNCH-57 > URL: https://issues.apache.org/jira/browse/CRUNCH-57 > 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: http://www.atlassian.com/software/jira