You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by lei liu <li...@gmail.com> on 2011/02/17 04:50:57 UTC

use DistributedCache to add many files to class path

I use DistributedCache  to add two files to class path,  exampe below code :
       String jeJarPath = "/group/aladdin/lib/je-4.1.7.jar";
        DistributedCache.addFileToClassPath(new Path(jeJarPath), conf);

        String tairJarPath = "/group/aladdin/lib/tair-aladdin-2.3.1.jar"
        DistributedCache.addFileToClassPath(new Path(jeJarPath), conf);

when map/reduce is executing,  the
"/group/aladdin/lib/tair-aladdin-2.3.1.jar" file is added to class path,
but  the "/group/aladdin/lib/je-4.1.7.jar" file is not added to class path.

How can I add many files to class path?



Thanks,


LiuLei

Re: use DistributedCache to add many files to class path

Posted by Alejandro Abdelnur <tu...@cloudera.com>.
Lei Liu,

You have a cut&paste error the second addition should use 'tairJarPath' but
it is using the 'jeJarPath'

Hope this helps.

Alejandro

On Thu, Feb 17, 2011 at 11:50 AM, lei liu <li...@gmail.com> wrote:

> I use DistributedCache  to add two files to class path,  exampe below code
> :
>        String jeJarPath = "/group/aladdin/lib/je-4.1.7.jar";
>         DistributedCache.addFileToClassPath(new Path(jeJarPath), conf);
>
>         String tairJarPath = "/group/aladdin/lib/tair-aladdin-2.3.1.jar"
>         DistributedCache.addFileToClassPath(new Path(jeJarPath), conf);
>
> when map/reduce is executing,  the
> "/group/aladdin/lib/tair-aladdin-2.3.1.jar" file is added to class path,
> but  the "/group/aladdin/lib/je-4.1.7.jar" file is not added to class path.
>
> How can I add many files to class path?
>
>
>
> Thanks,
>
>
> LiuLei
>