You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Eric Blood <wi...@gmail.com> on 2014/11/15 00:22:39 UTC
PigUnit testing with a Java UDF
I'm trying to write tests with PigUnit that get built as part of the maven
build process. How do I do a 'register' for a jar that isn't built yet?
I've tried googling for examples of PigUnit with Java UDF's, but can't find
anything. Has anyone been successful in doing this in maven?
The specific error I'm getting is ERROR 1070: Could not resolve
org.winkywooster.MembershipTest using imports: [, java.lang.,
org.apache.pig.builtin., org.apache.pig.impl.builtin.]
The same Pig script will run outside of PigUnit (with a register to the jar
containing the UDF), without error.
Eric
Re: PigUnit testing with a Java UDF
Posted by Serega Sheypak <se...@gmail.com>.
Do you use maven? It should work out of the box. Your UDF is in maven
classpath
2014-11-15 2:22 GMT+03:00 Eric Blood <wi...@gmail.com>:
> I'm trying to write tests with PigUnit that get built as part of the maven
> build process. How do I do a 'register' for a jar that isn't built yet?
> I've tried googling for examples of PigUnit with Java UDF's, but can't find
> anything. Has anyone been successful in doing this in maven?
>
> The specific error I'm getting is ERROR 1070: Could not resolve
> org.winkywooster.MembershipTest using imports: [, java.lang.,
> org.apache.pig.builtin., org.apache.pig.impl.builtin.]
>
> The same Pig script will run outside of PigUnit (with a register to the jar
> containing the UDF), without error.
>
> Eric
>