I have had similar problems and so far I have always traced them down to something simple that I had overlooked. So, I am making some simple suggestions based on that; maybe you have already tried these.
If you have a "register myjar.jar" in the PIG script it is very likely that the jar is indeed being copied over. Is it possible that in local mode, when your code works, the util class is actually being picked up from some other place? I would: - check the classpath when running in local mode (e.g., does the local mode work even without the register? That would be a giveaway) - check the contents of the jar (jar tvf and make sure the util class is actually packaged) -----Original Message----- From: Gayatri Rao [mailto:[email protected]] Sent: Monday, December 12, 2011 12:19 PM To: [email protected]; [email protected] Subject: Re: pig UDF and no such method found error REGISTER is supposed to copy all the registered jars onto the slaves. Could any one please explain on how this is done? I checked my job.jar thats created in my /user/gayatri/.staging/job_201112092210_0093/job.jar and it has all the correct classes so I am not able to understand why the slaves cant find the method. On Mon, Dec 12, 2011 at 11:37 AM, Gayatri Rao <[email protected]> wrote: > I am using absolute path only. When I run remotely on the cluster, it > says no class found. > > On Mon, Dec 12, 2011 at 11:30 AM, Jameson Lopp <[email protected]> wrote: > >> Have you tried using an absolute path when referencing your UDF jar >> as opposed to that relative path? >> >> -- >> Jameson Lopp >> Software Engineer >> Bronto Software, Inc >> >> >> On 12/12/2011 10:56 AM, Gayatri Rao wrote: >> >>> Hi all, >>> >>> I have a strange problem running pig using one of my own UDFs (in java). >>> My >>> java UDF calls a one of my util methods which is also part of the >>> same UDF jar. >>> Now, I try to run in local mode, it works and when I run it remotely >>> on the cluster, I get an error sayign that my util method doesnt >>> exit. It says No such method found error. >>> Any idea what I might be doing wrong? >>> >>> I have registered my jar in the following way. >>> >>> REGISTER myUDF.jar >>> >>> Thanks >>> Gayatri >>> >>> raw = LOAD '$input' using myLoader(); >>> >> >
