hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <ha...@cloudera.com>
Subject Re: Mechanism of hadoop -jar
Date Sun, 12 Aug 2012 02:02:25 GMT
Hey,

On Sun, Aug 12, 2012 at 3:39 AM, Jay Vyas <jayunit100@gmail.com> wrote:
> Hi guys:  I'm trying to find documentation on how "hadoop jar" actually
> works i.e. how it copies/runs the jar file across the cluster, in order to
> debug a jar issue.
>
> 1) Where can I get a good explanation of how the hadoop commands (i.e.
> -jar) are implemented ?

The "jar" sub-command executes the org.apache.hadoop.util.RunJar class.

> 2) Specifically, Im trying to access a bundled text file from a jar :
>
> class.getResource("myfile.txt")
>
> from inside a mapreduce job.... Is it okay to do this ?  Or does a classes
> ability to aquire local resources change  in the mapper/reducer JVMs ?

I believe this should work.

-- 
Harsh J

Mime
View raw message