You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by China Alice <ch...@yahoo.cn> on 2011/10/17 05:04:19 UTC

pig Latin the usage of limit

Recently, I use pig Latin language ,when it comes to limit clause,for example  

t = load 'input.txt' using PigStorage(',');
t2 = order t1 by $1;
t3 = limit t2 5;
in the process ,the number of reduce is 2,so the amount of data is ten rather than five,how can I to let  the amount of data is five.

Re: pig Latin the usage of limit

Posted by Dmitriy Ryaboy <dv...@gmail.com>.
Number of reducers for a limit should be 1. If you are seeing 2, there's a
bug. What version of Pig are you using? I can't duplicate this in my setup

On Sun, Oct 16, 2011 at 8:04 PM, China Alice <ch...@yahoo.cn> wrote:

> Recently, I use pig Latin language ,when it comes to limit clause,for
> example
>
> t = load 'input.txt' using PigStorage(',');
> t2 = order t1 by $1;
> t3 = limit t2 5;
> in the process ,the number of reduce is 2,so the amount of data is ten
> rather than five,how can I to let  the amount of data is five.
>