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 Holger Stenzhorn <ho...@gmail.com> on 2007/11/30 23:04:15 UTC

MapReduce configuration with job.xml

Hello,

Using the latest Hadoop from the Subversion trunk I have the following 
quesion:
I start a MapReduce task by using the command "hadoop jar test.jar 
foo.bar.Baz" command.

So far I have set some configuration properties in the "hadoop-site.xml" 
file (e.g. "mapred.child.java.opts").
Some other properties (e.g. "mapred.input.dir") I have set 
programmatically in my class (e.g. "jobConf.setInputPath(...)").

I would like now to create a "job.xml" file that integrates some 
properties (e.g. "mapred.child.java.opts") and pack it into the 
"test.jar" file.
What I do now is to put the "job.xml" on the top level of the jar file 
and write in my class "jobConf.addResource("job.xml")" before running 
the job.

This works but does not feel right... So is there a more sensible way to 
do this?

Cheers,
Holger