You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Yang <te...@gmail.com> on 2013/03/15 23:22:22 UTC
STORE skipped in pigUnit test?
I'm trying to test a custom LOAD class, which also contains the code for
STORE.
I put in a STORE in my pigUnit script. but the resulting file is never
created.
is STORE always skipped in pigUnit? in my case I'm not even checking the
corresponding var to be stored in my pigUnit code. i.e. my pig script is
like:
input = load ....
output_var = foreach input generate ....
STORE output_var INTO ..... USING MyCustomLoad();
my junit is like:
PigTest t = new PigTest("src/test/resources/my_test.pig");
t.assertOutput("input", new String[]{ "(123,456)" }
Thanks
Yang
Re: STORE skipped in pigUnit test?
Posted by Yang <te...@gmail.com>.
thanks!
On Fri, Mar 15, 2013 at 3:31 PM, meghana narasimhan <
meghana.narasimhan@gmail.com> wrote:
> You need to unoverride STORE using : t.unoverride("STORE");
>
> On Fri, Mar 15, 2013 at 3:22 PM, Yang <te...@gmail.com> wrote:
>
> > I'm trying to test a custom LOAD class, which also contains the code for
> > STORE.
> >
> > I put in a STORE in my pigUnit script. but the resulting file is never
> > created.
> >
> > is STORE always skipped in pigUnit? in my case I'm not even checking the
> > corresponding var to be stored in my pigUnit code. i.e. my pig script is
> > like:
> >
> > input = load ....
> >
> > output_var = foreach input generate ....
> >
> > STORE output_var INTO ..... USING MyCustomLoad();
> >
> >
> >
> > my junit is like:
> >
> >
> > PigTest t = new PigTest("src/test/resources/my_test.pig");
> >
> > t.assertOutput("input", new String[]{ "(123,456)" }
> >
> >
> >
> >
> > Thanks
> > Yang
> >
>
Re: STORE skipped in pigUnit test?
Posted by meghana narasimhan <me...@gmail.com>.
You need to unoverride STORE using : t.unoverride("STORE");
On Fri, Mar 15, 2013 at 3:22 PM, Yang <te...@gmail.com> wrote:
> I'm trying to test a custom LOAD class, which also contains the code for
> STORE.
>
> I put in a STORE in my pigUnit script. but the resulting file is never
> created.
>
> is STORE always skipped in pigUnit? in my case I'm not even checking the
> corresponding var to be stored in my pigUnit code. i.e. my pig script is
> like:
>
> input = load ....
>
> output_var = foreach input generate ....
>
> STORE output_var INTO ..... USING MyCustomLoad();
>
>
>
> my junit is like:
>
>
> PigTest t = new PigTest("src/test/resources/my_test.pig");
>
> t.assertOutput("input", new String[]{ "(123,456)" }
>
>
>
>
> Thanks
> Yang
>