On Thu, May 29, 2008 at 1:37 PM, Tanton Gibbs <[EMAIL PROTECTED]> wrote:
> What  is the right way to use a jar file within my map reduce program.

Hi Tanton,
As of Hadoop 0.17, you can add jars on the command line:
        bin/hadoop jar   -libjars foo.jar,baz.jar   your-job.jar

Pre 0.17, you can do this in your job configuration:
        DistributedCache.addFileToClassPath(new Path("/lib/foo.jar"), jobconf);
And then upload foo.jar before running your job:
        bin/hadoop fs -put   foo.jar   /lib/foo.jar

-Stuart

Reply via email to