Hi,

In M/R when you need an extra jar to use do you add the jar into the class
path by calling:
DistributedCache.addFileToClassPath(dfs-path-to-jar);

I imagine that the register command does something similar under the covers
but I was just looking for a way to have the UDF load its own dependency jar
and thus not leaving it up to the user to remember to issue the second
register command (for the dependency jar) on it own.

Thanks,
Tamir


On Wed, Mar 10, 2010 at 12:28 PM, Jeff Zhang <zjf...@gmail.com> wrote:

> Sorry, what do you mean M/R way ? Actually you do not have way to touch the
> M/R code in pig.
>
> On Wed, Mar 10, 2010 at 6:21 PM, Tamir Kamara <tamirkam...@gmail.com>
> wrote:
>
> > Hi,
> >
> > Register is working fine but it means that the user needs to know when
> it's
> > needed to register the additional jar. What about my question regarding
> the
> > M/R way of doing this ?
> >
> > Thanks,
> > Tamir
> >
> > On Wed, Mar 10, 2010 at 11:21 AM, Jeff Zhang <zjf...@gmail.com> wrote:
> >
> > > Using *REGISTER myfunc.jar;*
> > >
> > > refer here:
> > >
> >
> http://hadoop.apache.org/pig/docs/r0.5.0/piglatin_reference.html#REGISTER
> > >
> > >
> > > On Wed, Mar 10, 2010 at 4:52 PM, Tamir Kamara <tamirkam...@gmail.com>
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > I have a function (eval) that needs to use an external jar.
> > > > In M/R world this can be accomplished by uploading the jar to the dfs
> > and
> > > > using DistributedCache.addFileToClassPath.
> > > > How do I do the same (have the jar available for the udf) in pig?
> > > >
> > > > Thanks,
> > > > Tamir
> > > >
> > >
> > >
> > >
> > > --
> > > Best Regards
> > >
> > > Jeff Zhang
> > >
> >
>
>
>
> --
> Best Regards
>
> Jeff Zhang
>

Reply via email to