You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by "Tieman,Brian" <Br...@Cerner.com> on 2011/11/22 16:16:58 UTC

Start grunt with UDFs already registered?

Hello, I'm new to Pig :)  I'm wondering if there is some way to start up grunt and have my UDFs already registered and ready to go?

I tried placing them in the PIG_CLASSPATH.  They are available to grunt interactively that way, but the mapreduce jobs fail when upon execution because my UDFs cannot be found by the cluster.  Registering The jars at the grunt command prompt lets the mapreduce job find the jars, but there are several of them = a lot to type and lots of room for typographical error.

I can put the register commands into a script and run that script from within grunt.  This works but means the user has to know where the script is that registers everything-not ideal, but workable.

Is it possible to start pig with a command parameter to run that script and *not* exit when it's done so that the register commands can be passed into grunt at startup?

Thanks!


Brian Tieman
Software Architect
Brian.tieman@cerner.com<ma...@cerner.com>
www.cerner.com




----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.

Re: Start grunt with UDFs already registered?

Posted by Dmitriy Ryaboy <dv...@gmail.com>.
I believe you can set the "pig.additional.jars" property to have those jars
auto-registered.

D

On Tue, Nov 22, 2011 at 7:16 AM, Tieman,Brian <Br...@cerner.com>wrote:

>  Hello, I’m new to Pig J  I’m wondering if there is some way to start up
> grunt and have my UDFs already registered and ready to go?
>
> I tried placing them in the PIG_CLASSPATH.  They are available to grunt
> interactively that way, but the mapreduce jobs fail when upon execution
> because my UDFs cannot be found by the cluster.  Registering The jars at
> the grunt command prompt lets the mapreduce job find the jars, but there
> are several of them = a lot to type and lots of room for typographical
> error.
>
> I can put the register commands into a script and run that script from
> within grunt.  This works but means the user has to know where the script
> is that registers everything—not ideal, but workable.
>
> Is it possible to start pig with a command parameter to run that script
> and **not** exit when it’s done so that the register commands can be
> passed into grunt at startup?
>
> Thanks!
>
>
> *Brian Tieman*
> Software Architect
> *Brian.tieman@cerner.com* <Br...@cerner.com>
> www.cerner.com
>
>
>
>  ------------------------------
> CONFIDENTIALITY NOTICE This message and any included attachments are from
> Cerner Corporation and are intended only for the addressee. The information
> contained in this message is confidential and may constitute inside or
> non-public information under international, federal, or state securities
> laws. Unauthorized forwarding, printing, copying, distribution, or use of
> such information is strictly prohibited and may be unlawful. If you are not
> the addressee, please promptly delete this message and notify the sender of
> the delivery error by e-mail or you may call Cerner's corporate offices in
> Kansas City, Missouri, U.S.A at (+1) (816)221-1024.
>