Take the 2-minute tour ×

I have hadoop 1.0.4 installed. I have modified the /usr/bin/hadoop file by adding the following:


elif [ "$COMMAND" = "jar" ] ; then



elif [ "$COMMAND" = "jar-debug" ] ; then




This way I can run "hadoop jar SomeJar.jar SomeClass" to launch normally or run "hadoop jar-debug SomeJar.jar SomeClass" to launch in debug mode. This works, except when I want to pass command line arguments into my class (such as in the WordCount example). For example running:

"hadoop jar-debug WordCount.jar WordCount InputDir OutputDir"

with a breakpoint on the first line in the main class reveals that String[] args is an empty string (which obviously causes the program to fail later). If I run it using the normal jar command it works fine (so obviously the command line args are get passed in just fine using regular jar).

Anyone have any idea whats going on here? I am seriously stuck. Thanks in advance.

share|improve this question
Just an Update: Command line parameters are passed fine when running the debug on an actual cluster. They are only not passed in when running in pseudo-distributed mode... strange –  JHowIX Feb 1 '13 at 18:41

1 Answer 1

up vote 0 down vote accepted

Update for anyone in the future who experiences this problem:

If the java remote debugger is launched listening to the wrong IP Address (IE listening to a remote namenode instead of localhost), the JRD will still launch but command line parameters are not passed in.

share|improve this answer

Your Answer


