You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Marek Miglinski <mm...@seven.com> on 2011/09/09 12:54:59 UTC
PigTest multiple output
Hey all,
Correct if I'm wrong, but there is no way to test Pig 0.8.1 script through JUnit PigTest if I have multiple STORE? Ex Pig end file:
STORE result1 INTO '$outputPath/result1' USING PigStorage(',');
STORE result2 INTO '$outputPath/result2' USING PigStorage(',');
STORE result3 INTO '$outputPath/result3' USING PigStorage(',');
In this situation, I have to go through all PIG script 3 times? Like this (JAVA):
pigTest.assertOutput("record", input, "result1", output1);
pigTest.assertOutput("record", input, "result2", output2);
pigTest.assertOutput("record", input, "result3", output3);
So if I have like 9 STOREs, I have to go through Pig script 9 times? That's not efficient at all... :(
RE: PigTest multiple output
Posted by Marek Miglinski <mm...@seven.com>.
Alan,
I meant that I'm writing my own Pig reports and I want to test them through Eclipse with possibility to Debug my custom Java UDFs.
Thanks,
Marek M.
________________________________________
From: Alan Gates [gates@hortonworks.com]
Sent: Friday, September 09, 2011 8:10 PM
To: user@pig.apache.org
Subject: Re: PigTest multiple output
You might check out the new e2e test harness, which can handle multi-query in a single pass and does not require you to write any Java. See https://cwiki.apache.org/confluence/display/PIG/HowToTest
Alan.
On Sep 9, 2011, at 3:54 AM, Marek Miglinski wrote:
> Hey all,
>
> Correct if I'm wrong, but there is no way to test Pig 0.8.1 script through JUnit PigTest if I have multiple STORE? Ex Pig end file:
> STORE result1 INTO '$outputPath/result1' USING PigStorage(',');
> STORE result2 INTO '$outputPath/result2' USING PigStorage(',');
> STORE result3 INTO '$outputPath/result3' USING PigStorage(',');
> In this situation, I have to go through all PIG script 3 times? Like this (JAVA):
> pigTest.assertOutput("record", input, "result1", output1);
> pigTest.assertOutput("record", input, "result2", output2);
> pigTest.assertOutput("record", input, "result3", output3);
>
> So if I have like 9 STOREs, I have to go through Pig script 9 times? That's not efficient at all... :(
Re: PigTest multiple output
Posted by Alan Gates <ga...@hortonworks.com>.
You might check out the new e2e test harness, which can handle multi-query in a single pass and does not require you to write any Java. See https://cwiki.apache.org/confluence/display/PIG/HowToTest
Alan.
On Sep 9, 2011, at 3:54 AM, Marek Miglinski wrote:
> Hey all,
>
> Correct if I'm wrong, but there is no way to test Pig 0.8.1 script through JUnit PigTest if I have multiple STORE? Ex Pig end file:
> STORE result1 INTO '$outputPath/result1' USING PigStorage(',');
> STORE result2 INTO '$outputPath/result2' USING PigStorage(',');
> STORE result3 INTO '$outputPath/result3' USING PigStorage(',');
> In this situation, I have to go through all PIG script 3 times? Like this (JAVA):
> pigTest.assertOutput("record", input, "result1", output1);
> pigTest.assertOutput("record", input, "result2", output2);
> pigTest.assertOutput("record", input, "result3", output3);
>
> So if I have like 9 STOREs, I have to go through Pig script 9 times? That's not efficient at all... :(