You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Ruslan Al-Fakikh <me...@gmail.com> on 2013/01/20 17:26:44 UTC

Pig 0.10.0-cdh4.1.1 uses its old JodaTime instead of my new JodaTime dependency in UDF

Hi guys,

I am having a JodaTime maven version issue.
I have a Java UDF in the form of a Maven project with this dependency:
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.1</version>
</dependency>
Pig itself is dependent on JodaTime 1.6:
https://issues.apache.org/jira/browse/PIG-3031
When my UDF uses a method that exists only in the new version I get an
error that this method doesn't exist, so I am pretty sure that the old
version of JodaTime is used. How can Pig pick up the old version? I am not
a perfect expert in Maven, but AFAIK the new version of JodaTime should be
compiled right into the jar, that contains the UDF. Even when I set the
JodaTime jar explicitly in my Pig script:
*REGISTER joda-time-2.1.jar*
*my UDF still uses the old version:(*

Thanks in advance

Re: Pig 0.10.0-cdh4.1.1 uses its old JodaTime instead of my new JodaTime dependency in UDF

Posted by Cheolsoo Park <ch...@cloudera.com>.
Hi Ruslan,

Did you try to set "mapreduce.job.user.classpath.first" to true?

http://search-hadoop.com/m/nsmBv1lUCi52/Jar+Conflicts&subj=Jar+Conflicts

Btw, I will commit PIG-3031 unless there are test failures.

Thanks,
Cheolsoo


On Sun, Jan 20, 2013 at 8:26 AM, Ruslan Al-Fakikh <me...@gmail.com>wrote:

> Hi guys,
>
> I am having a JodaTime maven version issue.
> I have a Java UDF in the form of a Maven project with this dependency:
> <dependency>
>  <groupId>joda-time</groupId>
> <artifactId>joda-time</artifactId>
> <version>2.1</version>
>  </dependency>
> Pig itself is dependent on JodaTime 1.6:
> https://issues.apache.org/jira/browse/PIG-3031
> When my UDF uses a method that exists only in the new version I get an
> error that this method doesn't exist, so I am pretty sure that the old
> version of JodaTime is used. How can Pig pick up the old version? I am not
> a perfect expert in Maven, but AFAIK the new version of JodaTime should be
> compiled right into the jar, that contains the UDF. Even when I set the
> JodaTime jar explicitly in my Pig script:
> *REGISTER joda-time-2.1.jar*
> *my UDF still uses the old version:(*
>
> Thanks in advance
>
> --
>
>
>
>