hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hanish Bansal <hanish.bansal.agar...@gmail.com>
Subject How to overwrite container-log4j.properties file
Date Mon, 29 Sep 2014 12:00:40 GMT
Hi All,

I want to use custom logging for map-reduce application so i want to
configure my log4j.properties file in hadoop.
I want that logging of all containers should be happen according to my
log4.properties file.

For this i updated different properties in mapred-site.xml configuration
file. For example:

<property>
<name>mapreduce.map.log.level</name>
<value>INFO,flume
-Dlog4j.configuration=/home/hanish/Desktop/log4j.properties</value>
</property>

<property>
<name>mapreduce.reduce.log.level</name>
<value>INFO,flume
-Dlog4j.configuration=/home/hanish/Desktop/log4j.properties
-Dhadoop.root.logger=INFO,flume</value>
</property>
<property>
<name>yarn.app.mapreduce.am.command-opts</name>
<value>-Dlog4j.configuration=/home/hanish/Desktop/log4j.properties
-Xmx1024m -Dhadoop.root.logger=INFO,flume</value>
</property>

<property>
<name>yarn.app.mapreduce.am.admin-command-opts</name>
<value>-Dlog4j.configuration=/home/hanish/Desktop/log4j.properties</value>
</property>

Using this configuration MRAppMaster is getting started with more one
log4j.configuration variables and logging is done according to
container-log4j.properties file. Please find the jps information of
Application master is:

19812 MRAppMaster -Dlog4j.configuration=container-log4j.properties
-Dyarn.app.container.log.dir=/home/hanish/opt/hadoop-2.2.0/logs/userlogs/application_1411987111980_0001/container_1411987111980_0001_01_000001
-Dyarn.app.container.log.filesize=0 -Dhadoop.root.logger=INFO,CLA
-Dlog4j.configuration=/home/hanish/Desktop/log4j.properties
-Dlog4j.configuration=/home/hanish/Desktop/log4j.properties -Xmx1024m
-Dhadoop.root.logger=INFO,flume
5959 Application -Xmx20m -Dflume.root.logger=DEBUG,console
-Djava.library.path=:/home/hanish/opt/hadoop-2.2.0/lib/native

Please let me know how to overwrite container-log4j.properties file ?


-- 
*Thanks & Regards*
*Hanish Bansal*

Mime
View raw message