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.

Hiveserver2 Log4j setting for daily rotation and backup of 10 days

Highlighted

Hiveserver2 Log4j setting for daily rotation and backup of 10 days

New Contributor

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

Re: Hiveserver2 Log4j setting for daily rotation and backup of 10 days

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.

.

Re: Hiveserver2 Log4j setting for daily rotation and backup of 10 days

New Contributor

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