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

Switch to Threaded View
Pig >> mail # dev >> Re: Review Request 14897: PIG-3538 Implement LIMIT in Tez

Copy link to this message
Re: Review Request 14897: PIG-3538 Implement LIMIT in Tez

This is an automatically generated e-mail. To reply, visit:

(Updated Oct. 24, 2013, 4:45 p.m.)
Review request for pig, Cheolsoo Park, Daniel Dai, Mark Wagner, and Rohini Palaniswamy.

Updated diff based on comments from reviewers. Incorporated Daniel's patch for the e2e test.
Bugs: PIG-3538
Repository: pig-git
Description (updated)

Implement LIMIT in Tez by providing an implementation of visitLimit in TezCompiler.java.

UPDATED (Oct 24 4:37 PM):
1. I added a test to TestTezCompiler.java and a GLD file
2. I included Daniel's patch for a new e2e test
Diffs (updated)

  src/org/apache/pig/backend/hadoop/executionengine/tez/TezCompiler.java 0c20214
  test/e2e/pig/tests/tez.conf 5edc093
  test/org/apache/pig/test/data/GoldenFiles/TEZC4.gld PRE-CREATION
  test/org/apache/pig/tez/TestTezCompiler.java ef51876
  test/org/apache/pig/tez/TestTezJobControlCompiler.java 0a23513

Diff: https://reviews.apache.org/r/14897/diff/
Testing (updated)

[abain@abain-ld pig]$ cat data/1.dat

[abain@abain-ld pig]$ cat test3.pig
a = load './1.dat' using PigStorage(',') as (id:int, fruit:chararray);
b = LIMIT a 2;
STORE b INTO 'foo';

I ran with with "pig -x tez -f test3.pig" and got the following (correct results):

[abain@abain-ld pig]$ hadoop fs -ls /user/abain/foo
Found 2 items
-rw-r--r--   1 abain supergroup          0 2013-10-23 18:38 /user/abain/foo/_SUCCESS
-rw-r--r--   1 abain supergroup         17 2013-10-23 18:38 /user/abain/foo/part-r-00000

[abain@abain-ld pig]$ hadoop fs -cat /user/abain/foo/part-r-00000
1 orange
2 apple

UPDATED (Oct 24 4:37 PM):
1. ant -Dtestcase=TestTezCompiler test passes
2. I ran test-e2e-tez. The new test seems to pass (although something else failed).

Alex Bain