Grokbase Groups Pig user August 2010
FAQ
No I have not used it in grunt. I am looking to use the pigServer because of the parameter passing that is doable through Java. I am using Pig 0.7.0.

-----Original Message-----
From: Ashutosh Chauhan
Sent: Thursday, August 05, 2010 12:54 PM
To: pig-user@hadoop.apache.org
Subject: Re: LIMIT Issue

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 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

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 8 | next ›
Discussion Overview
groupuser @
categoriespig, hadoop
postedAug 4, '10 at 10:07p
activeAug 9, '10 at 12:58a
posts8
users2
websitepig.apache.org

2 users in discussion

Ashutosh Chauhan: 4 posts Matthew Smith: 4 posts

People

Translate

site design / logo © 2021 Grokbase