You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Saptarshi Guha <sa...@gmail.com> on 2010/11/24 20:30:07 UTC

Pass -D options to hadoop jar

Hello,

A rather basic question, how do I pass the -D option to the wordcount?
I've tried several without
much success


hadoop jar  /usr/lib/hadoop/hadoop-0.20.2+320-examples.jar -D
mapred.job.tracker=local wordcount /wsc/sguha-test/x1
/wsc/sguha-test/x1.o

Unknown program '-D' chosen.


hadoop jar -D mapred.job.tracker=local
/usr/lib/hadoop/hadoop-0.20.2+320-examples.jar -wordcount
/wsc/sguha-test/x1 /wsc/sguha-test/x1.o

Exception in thread "main" java.io.IOException: Error opening job jar: -D
	at org.apache.hadoop.util.RunJar.main(RunJar.java:124)


Is there a way to pass -D options to hadoop jar?

Thanks
S

Re: Pass -D options to hadoop jar

Posted by Ken <ke...@gmail.com>.
After the jar you need to specify which class to use, in this case the wordcount class. 

Sent from my iPad

On Nov 24, 2010, at 11:30 AM, Saptarshi Guha <sa...@gmail.com> wrote:

> Hello,
> 
> A rather basic question, how do I pass the -D option to the wordcount?
> I've tried several without
> much success
> 
> 
> hadoop jar  /usr/lib/hadoop/hadoop-0.20.2+320-examples.jar -D
> mapred.job.tracker=local wordcount /wsc/sguha-test/x1
> /wsc/sguha-test/x1.o
> 
> Unknown program '-D' chosen.
> 
> 
> hadoop jar -D mapred.job.tracker=local
> /usr/lib/hadoop/hadoop-0.20.2+320-examples.jar -wordcount
> /wsc/sguha-test/x1 /wsc/sguha-test/x1.o
> 
> Exception in thread "main" java.io.IOException: Error opening job jar: -D
>    at org.apache.hadoop.util.RunJar.main(RunJar.java:124)
> 
> 
> Is there a way to pass -D options to hadoop jar?
> 
> Thanks
> S