Return-Path: X-Original-To: apmail-pig-dev-archive@www.apache.org Delivered-To: apmail-pig-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1C1FD9F87 for ; Wed, 21 Sep 2011 20:51:31 +0000 (UTC) Received: (qmail 44110 invoked by uid 500); 21 Sep 2011 20:51:30 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 44079 invoked by uid 500); 21 Sep 2011 20:51:30 -0000 Mailing-List: contact dev-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pig.apache.org Delivered-To: mailing list dev@pig.apache.org Received: (qmail 44071 invoked by uid 500); 21 Sep 2011 20:51:30 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 44068 invoked by uid 99); 21 Sep 2011 20:51:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Sep 2011 20:51:30 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Sep 2011 20:51:29 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 6590AA682A for ; Wed, 21 Sep 2011 20:51:09 +0000 (UTC) Date: Wed, 21 Sep 2011 20:51:09 +0000 (UTC) From: "Daniel Dai (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: <45439551.52398.1316638269412.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1038695751.8885.1314182249772.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (PIG-2237) LIMIT generates wrong number of records if pig determines no of reducers as more than 1 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/PIG-2237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Dai updated PIG-2237: ---------------------------- Attachment: PIG-2237-4.patch PIG-2237-4.patch address Dmitriy's review comment. > LIMIT generates wrong number of records if pig determines no of reducers as more than 1 > --------------------------------------------------------------------------------------- > > Key: PIG-2237 > URL: https://issues.apache.org/jira/browse/PIG-2237 > Project: Pig > Issue Type: Bug > Affects Versions: 0.8.0, 0.9.0 > Reporter: Anitha Raju > Assignee: Daniel Dai > Fix For: 0.9.1, 0.10 > > Attachments: PIG-2237-1.patch, PIG-2237-2.patch, PIG-2237-3.patch, PIG-2237-4.patch > > > Hi, > For a script > ======== > A = load 'test.txt' using PigStorage() as (a:int,b:int); > B = order A by a ; > C = limit B 2; > store C into 'op1' using PigStorage(); > ======== > Limit and ORDER BY are done in the same MR job if no explicit PARALLELism is mentioned. > In this case, the no of reducers are determined by pig and sometimes it is calculated > 1. > Since limit happens at the reduce side, each reduce tasks does a limit separately generating n*2 records where n is the no of reduce tasks calculated by pig. > If an explicit specification of no of reduce tasks using PARALLEL keyword is done on ORDER BY, > ========== > B = order A by a PARALLEL 4; > ========== > another MR is created with 1 reduce task where the limit is done. > In short, the issue occurs when the no of reducers calculated by pig is greater than 1 and a limit is involved in the MR. > The issue can be replicated by specifying > ========== > -Dpig.exec.reducers.bytes.per.reducer > ========== > The issue is seen in 0.8 and 0.9 version. It works good in 0.7 > Regards, > Anitha -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira