You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Dan Yi <dy...@mediosystems.com> on 2011/11/14 23:40:21 UTC

register udf

hi, all

i have a big projects, one of my project have all the pig scripts, and other one have all the java file as udfs for the pig scripts. i use eclipse/maven to 
manage all the projects, just wonder how i can use the udfs java file under other project for my pig scripts? i can only register them as .jar file in pig script?
can i just point to the location/project where those udf java files directly like 'import' statement in java? much thanks!

Dan

Re: register udf

Posted by Gianmarco De Francisci Morales <gd...@apache.org>.
Hi Dan,
to use UDFs you just need to put the relative class files in a jar, and
register it in the pig script.
No need to import or anything else.

Cheers,
--
Gianmarco



On Mon, Nov 14, 2011 at 23:40, Dan Yi <dy...@mediosystems.com> wrote:

> hi, all
>
> i have a big projects, one of my project have all the pig scripts, and
> other one have all the java file as udfs for the pig scripts. i use
> eclipse/maven to
> manage all the projects, just wonder how i can use the udfs java file
> under other project for my pig scripts? i can only register them as .jar
> file in pig script?
> can i just point to the location/project where those udf java files
> directly like 'import' statement in java? much thanks!
>
> Dan