On 09/24/2010 12:42 PM, Martin Becker wrote:
Hello David,

Thanks for your suggestions. I fail to see where your approach is
different from the one used in the tutorial.

The difference is that the tutorial launches the job using the "hadoop" executable:

$ bin/hadoop jar /user/joe/wordcount.jar org.myorg.WordCount2 /user/joe/wordcount/input /user/joe/wordcount/output

With the example I gave, you would launch your app directly from the command line

$ java -cp <jars> YourApp -libjars <jars> <parms>

The -libjars option is a
command line option of the Hadoop executable.

By implementing the Tool/ToolRunner approach, you are making the -libjars option an option of your app too. Which is why you are able to run it natively from the command line without the hadoop executable and have it distribute the jars to the necessary places in the cluster.

HTH,

DR

Reply via email to