Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> LIMIT Issue


+
Matthew Smith 2010-08-04, 22:07
Matt,

Which version you are on? What happens if you run your query through
grunt instead of PigServer?
I tried load-order-limit sequence on a small dataset on grunt and I
got expected results.

Ashutosh
On Wed, Aug 4, 2010 at 15:07, Matthew Smith <[EMAIL PROTECTED]> wrote:
> Hey,
>
>
>
> While running in Java a LIMIT statement is not getting executed.
>
>
>
> /code
>
>                        myServer.registerQuery("flow_firstcut = FOREACH
> data GENERATE sIP, dIP, sPort, dPort, protocol, bytes, flags;");
>
>                        myServer.registerQuery("filtered = FILTER
> flow_firstcut BY sIP matches 'someIP';");
>
>
>
>                        myServer.registerQuery("O = ORDER filtered BY
> bytes DESC;");
>
>
>
>                        myServer.registerQuery("topTen = LIMIT O 10;");
>
>
>
>                        myServer.store("topTen", outputFilePath);
>
>
>
> /code
>
>
>
> This produces a 699 line file. It should produce a 10 line file.
>
>
>
> /code
>
>                        registerQuery("flow_firstcut = FOREACH data
> GENERATE sIP, dIP, sPort, dPort, protocol, bytes, flags;");
>
>                        myServer.registerQuery("filtered = FILTER
> flow_firstcut BY sIP matches '"+parameters[1]+"';");
>
>
>
>                        //myServer.registerQuery("O = ORDER filtered BY
> bytes DESC;");
>
>
>
>                        myServer.registerQuery("topTen = LIMIT filtered
> 10;");
>
>
>
>                        myServer.store("topTen", outputFilePath);
>
> /code
>
>
>
> This produces a 10 line file.
>
>
>
> Is there a known bug I am unaware of or can you not order then limit?
>
> http://hadoop.apache.org/pig/docs/r0.7.0/piglatin_ref2.html#LIMIT
>
> indicates that this is a valid sequence of calls.
>
>
>
> Help?
>
>
>
> Matt
>
>
+
Matthew Smith 2010-08-05, 17:57
+
Ashutosh Chauhan 2010-08-05, 19:10
+
Matthew Smith 2010-08-05, 21:54
+
Ashutosh Chauhan 2010-08-06, 06:43
+
Matthew Smith 2010-08-06, 14:16
+
Ashutosh Chauhan 2010-08-09, 00:57