The earlier question is easier to answer given you are loading the file yourselves :)

You have multiple solutions:
(1) Put it in the lib folder inside the job.jar. It should be automatically available from the task's classpath. (2) Set it in distributed cache as a classpath file. See DistributedCache.addCacheFile(URI uri, Configuration conf).

+vinod


On Thursday 12 August 2010 06:27 AM, Sanjay X. Jain wrote:
Probably a better question is: In a hadoop job, how can I load my own 
log4j.properties file instead of the default one?

Thx!


On 8/11/10 1:56 PM, "Sanjay Jain"<[email protected]>  wrote:

I have a log4jconfig.xml file that is loaded in my hadoop job code as: 
DOMConfigurator.configure("log4jconfig.xml");
How should I pass this file to the job (and its mapper and reducer)? I have 
tried to include it in CLASSPATH env variable, and by including the file in 
job's jar file, both don't seem to work.
Purpose: want to control what is logged where in my hadoop job's 
classes/packages.

Any clues will be really helpful.

Thx!
Sanjay



Reply via email to