Return-Path: Delivered-To: apmail-hadoop-pig-dev-archive@www.apache.org Received: (qmail 6648 invoked from network); 5 Oct 2009 19:12:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Oct 2009 19:12:58 -0000 Received: (qmail 2154 invoked by uid 500); 5 Oct 2009 19:12:58 -0000 Delivered-To: apmail-hadoop-pig-dev-archive@hadoop.apache.org Received: (qmail 2120 invoked by uid 500); 5 Oct 2009 19:12:58 -0000 Mailing-List: contact pig-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pig-dev@hadoop.apache.org Delivered-To: mailing list pig-dev@hadoop.apache.org Received: (qmail 2110 invoked by uid 99); 5 Oct 2009 19:12:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Oct 2009 19:12:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Oct 2009 19:12:55 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 91366234C1F0 for ; Mon, 5 Oct 2009 12:12:31 -0700 (PDT) Message-ID: <1548622642.1254769951593.JavaMail.jira@brutus> Date: Mon, 5 Oct 2009 12:12:31 -0700 (PDT) From: "Richard Ding (JIRA)" To: pig-dev@hadoop.apache.org Subject: [jira] Updated: (PIG-984) PERFORMANCE: Implement a map-side group operator to speed up processing of ordered data In-Reply-To: <1177352385.1254337763474.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/PIG-984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard Ding updated PIG-984: ----------------------------- Assignee: Richard Ding > PERFORMANCE: Implement a map-side group operator to speed up processing of ordered data > ---------------------------------------------------------------------------------------- > > Key: PIG-984 > URL: https://issues.apache.org/jira/browse/PIG-984 > Project: Pig > Issue Type: New Feature > Reporter: Richard Ding > Assignee: Richard Ding > > The general group by operation in Pig needs both mappers and reducers (the aggregation is done in reducers). This incurs disk writes/reads between mappers and reducers. > However, in the cases where the input data has the following properties > 1. The records with the same key are grouped together (such as the data is sorted by the keys). > 2. The records with the same key are in the same mapper input. > the group by operation can be performed in the mappers only and thus remove the overhead of disk writes/reads. > Alan proposed adding a hint to the group by clause like this one: > {code} > A = load 'input' using SomeLoader(...); > B = group A by $0 using "mapside"; > C = foreach B generate ... > {code} > The proposed addition of using "mapside" to group will be a mapside group operator that collects all records for a given key into a buffer. When it sees a key change it will emit the key and bag for records it had buffered. It will assume that all keys for a given record are collected together and thus there is not need to buffer across keys. > It is expected that "SomeLoader" will be implemented by data systems such as Zebra to ensure the data emitted by the loader satisfies the above properties (1) and (2). > It will be the responsibility of the user (or the loader) to guarantee these properties (1) & (2) before invoking the mapside hint for the group by clause. The Pig runtime can't check for the errors in the input data. > For the group by clauses with mapside hint, Pig Latin will only support group by columns (including *), not group by expressions nor group all. > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.