hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Xu <wenhao...@gmail.com>
Subject How could I let my map-reduce job use the log4j.properties configuration in the jar file contains the map-reduce classes?
Date Thu, 17 Feb 2011 06:54:29 GMT
Dear Buddies,

I am running a map reduce job in a jar file through the shell like the

#! /bin/sh
export HADOOP_CLASSPATH=/home/xuwh/log-fetcher.jar
export CLASSPATH=/home/xuwh/:$CLASSPATH

In the LogCleaner class, besides submitting the map-reduce job, I will wait
for the job completion and send the result to a server for further

I added some logs through log4j in the log uploading part and I wanted to
receive the error logs through an SMTP appender, and I created my own
log4j.properties file in the jar contains the LogCleaner but it didn't work.

I don't want to change the log configuration in the hadoop for I have to
change the configuration in all nodes. And different map-reduce jar might
have different configuration in log4j.

Is there any way I could make the log4j code in jar file using the
log4j.properties inside the jar? Not the code in the map-reduce job, but the
code to setup the job and the code to process after the job is completed.


Best wishes,
Stanley Xu

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message