hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arun C Murthy <acmur...@apache.org>
Subject Re: Distribute native library within a job jar
Date Sat, 09 Jul 2011 19:20:32 GMT

On Jul 9, 2011, at 12:08 PM, Donghan (Jarod) Wang wrote:

> Hey all,
> I'm working on a project that uses a native c library. Although I can
> use DistributedCache as a way to distribute the c library, I'd like to
> use the jar to do the job. What I mean is packing the c library into
> the job jar, and writing code in a way that the job can find the
> library once it gets submitted. I wonder if this is possible. If so
> how can I obtain the path in the code.

Just add it as a cache-file in the distributed cache, enable the =
symlink and just System.load the filename (of the symlink).

More details: http://hadoop.apache.org/common/docs/r0.20.0/mapred_tutorial.html#DistributedCache

View raw message