Grokbase Groups Pig user August 2010
FAQ
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

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 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