Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Changing log directory for Hadoop, CDH4

Changing log directory for Hadoop, CDH4

New Contributor

Hello everyone,

 

I have recently deployed a CDH 4.4.0 cluster (manual install/config) and I seem to have some problems with the logging directories. Although I modified the log4j.properties file (the hadoop.log.dir value) in order to point the logs to the desired directory, the logs are still generated under /var/logs/.

 

How could I modify the logging directory? What exactly am I missing here?

I must say that everything else works perfectly fine in the cluster. Logs also look great. But they look great in the wrong directory.

 

Thank you in advance for your answers!

2 REPLIES 2

Re: Changing log directory for Hadoop, CDH4

Master Guru
Edit the /etc/default/hadoop and similar files and alter the HADOOP_LOG_DIR environment value under them to point to the directory you need them to go to.

You can alternatively use symlinks.
Highlighted

Re: Changing log directory for Hadoop, CDH4

New Contributor

edit the below files and add the following "HADOOP_LOG_DIR"

 

/etc/default/hadoop-hdfs-namenode

/etc/default/hadoop-hdfs-secondarynamenode

/etc/default/hadoop-hdfs-datanode