PDA

View Full Version : How to share UDF jar files cross different jobs using Pig executor?



seanhan
10-12-2012, 07:02 PM
How can I share same UDF jar files cross different jobs? Now I have a job using pig script executor, and I specify the parameter udf_jar using ${Internal.Job.Filename.Directory}/xyz.jar. In my pig script, I am using REGISTER $udf_jar and it is working fine. But I can't find out another way to use the jar file not in the same directory as the job (my pig script is in the same directory as job). I want to store the jar file in a generic folder and it can be shared by different job.

seanhan
10-19-2012, 04:58 PM
Finally I found the way to share the same jar file between the jobs. Put the jar file in a directory and make sure there is no space in your directory. I specify the parameter udf_jar using ${your.jar.file.directory}/xyz.jar. that is it.