Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Hiveserver2 Log4j setting for daily rotation and backup of 10 days

Explorer

Hiveserver 2 log4j settings for daily rotation and delete more than 10 days logs .

Can anyone share the config file to do that. I have already configured that ( attached ) but it is not working as expected . So I would like to know where exactly we need to configure it (Advanced-hive-execlog4j,Advanced hive-log4j,Advanced hive-log4j2,Advanced beeline-log4j2 ) we are usinglog.txt beeline hs2.HA enabled HS2.d

2 REPLIES 2

Super Mentor

@Raj ji

In ambari UI just search for "hive_log_maxbackupindex" and "hive2_log_maxbackupindex" and then change it to 10 ( emans the hive logs should not exceed more than 10 back indexes)

Ambari UI --> Hive --> Configs --> Advanced --> (In the "Properties Filter" just below the "Service Action" Button) type "maxbackupindex" then you will find the two text fields with default value as (30) means by default 30 days log copies are saved. Change the value to 10

Then restart all required services.

.

Explorer

capture1.png@Jay Kumar SenSharma . Everything is configured properly in the Ambari . However it is not working as expected . Please refer attached screenshot . you will understand and not sure why it is not removing the older logs which is more than 5 days as configured capture.png

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.