jamal sasha 2012-10-24, 19:44
-Re: UDF function help
pablomar 2012-10-24, 19:54
no need to do a complete pig installation just to compile. You just need
the Pig's jar file. In my case: pig-0.9.2-cdh4.0.1.jar (located under the
pig installation folder)
and add it to your project classpath
On Wed, Oct 24, 2012 at 3:44 PM, jamal sasha <[EMAIL PROTECTED]> wrote:
> > I am trying to learn both java and pig programming.. So basically.. not
> an ideal combination but things are looking good.. but I am not able to
> solve this out..
> > In my local environment I dont have pig libraries... but on the
> cluster... YES!
> > So.. when I do
> > import org.apache.pig.EvalFunc;
> > It is always red lined.. for obvious reasons..
> > So basically, do i just ignore it and just create a jar file??
> > or do i do a local download of pig.. import libraries.. write a code..
> and then create a jar file.. and then run it?
> > Can anyone give me step by step instructions to write a udf..
> > Basically not on writing udf but how to tackle these issues..Like
> > 1) Import libraries (ignore the red lines)
> > 2) Write the code..
> > 3) Package jar
> > 4) Register udf on pig script
> > 5) Run the script
> > It would be awesome if someone can fill in the technical details by
> filling the above steps using an example.. wrt my original query which is
> how do I import and package udf function (assuming I am able to write the
> udf function)
> > thanks