- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Controlling the hadoop logs using log 4j
- Labels:
-
Apache Hadoop
Created 03-30-2017 07:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do any have the log 4j properties for controlling the hadoop logs
Created 03-30-2017 08:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@khadeer mhmd - You should use the following properties of the RollingFileAppender to efficiently control the Size and the number of backup index of old log files:
maxFileSize:This is the critical size of the file above which the file will be rolled. Default value is 10 MB.
maxBackupIndex: This property denotes the number of backup files to be created. Default value is 1.
More details in :
https://community.hortonworks.com/questions/89171/hdfs-audit-log-file-size-issues.html#comment-89639
Created 03-30-2017 07:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
References:
You can get the logging config from ambari UI.
- Login to Ambari
- Goto the config tab of HDFS component.
- Filter for Advanced hdfs-log4j
In case of ambari managed cluster it should be managed via ambari only else it will override out manual changes made to the log4j.propeties file on component restart.
/etc/hadoop/conf/log4j.properties
.
Created 03-30-2017 07:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Additional references: https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.0-Win/bk_HDP_Install_Win/content/ref-8896fe3b...
-
log4j.properties
:Use the
log4j.properties
file to modify the log purging intervals of the HDFS logs. This file defines logging for all the Hadoop services. It includes, information related to appenders used for logging and layout. For more details, see the log4j documentation.
.
Created 03-30-2017 08:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@khadeer mhmd - You should use the following properties of the RollingFileAppender to efficiently control the Size and the number of backup index of old log files:
maxFileSize:This is the critical size of the file above which the file will be rolled. Default value is 10 MB.
maxBackupIndex: This property denotes the number of backup files to be created. Default value is 1.
More details in :
https://community.hortonworks.com/questions/89171/hdfs-audit-log-file-size-issues.html#comment-89639
