<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: [Ambari] Manage retention of hiveserver2.log file by using DailyRollingFileAppender in log4j through Ambari. in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Manage-retention-of-hiveserver2-log-file-by-using/m-p/213167#M175095</link>
    <description>&lt;P&gt;I don't think "log4j.appender.DRFA.MaxBackupIndex" is working, even though, it is listed in the log4j-hive.properties file by default and commented in Ambari.&lt;/P&gt;&lt;P&gt;I found out there are two options to achieve the similar goal.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Option 1: Customize DailyRollingFileAppender&lt;UL&gt;&lt;LI&gt;Reference: &lt;A href="https://wiki.apache.org/logging-log4j/DailyRollingFileAppender" target="_blank"&gt;https://wiki.apache.org/logging-log4j/DailyRollingFileAppender&lt;/A&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Option 2: Use the TimeBasedRollingPolicy of DailyRollingFileAppender&lt;UL&gt;&lt;LI&gt;Reference: &lt;A href="https://stackoverflow.com/questions/5117758/configuring-rollingfileappender-in-log4j" target="_blank"&gt;https://stackoverflow.com/questions/5117758/configuring-rollingfileappender-in-log4j&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Thu, 10 Aug 2017 10:41:11 GMT</pubDate>
    <dc:creator>mungeol_heo</dc:creator>
    <dc:date>2017-08-10T10:41:11Z</dc:date>
    <item>
      <title>[Ambari] Manage retention of hiveserver2.log file by using DailyRollingFileAppender in log4j through Ambari.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Manage-retention-of-hiveserver2-log-file-by-using/m-p/213164#M175092</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Does anyone know how to manage retention of hiveserver2.log file by using DailyRollingFileAppender in log4j through Ambari.&lt;/P&gt;&lt;P&gt;E.g. Keep last 30 days' log files which in hiveserver2.log.yyyy-MM-dd format.&lt;/P&gt;&lt;P&gt;BTW, it is DailyRollingFileAppender, not RollingFileAppender.&lt;/P&gt;&lt;P&gt;Thank you.&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 12:03:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-Manage-retention-of-hiveserver2-log-file-by-using/m-p/213164#M175092</guid>
      <dc:creator>mungeol_heo</dc:creator>
      <dc:date>2022-09-16T12:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: [Ambari] Manage retention of hiveserver2.log file by using DailyRollingFileAppender in log4j through Ambari.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Manage-retention-of-hiveserver2-log-file-by-using/m-p/213165#M175093</link>
      <description>&lt;P&gt;Go to etc/hive/conf&lt;/P&gt;&lt;P&gt;find a file called hive-log4j.prpoerties&lt;/P&gt;&lt;PRE&gt;# 30-day backup 

#log4j.appender.DRFA.MaxBackupIndex= 30&lt;/PRE&gt;&lt;P&gt;Find the abouve commented line inside the file.&lt;/P&gt;&lt;P&gt;Remove the # and modify value to 10. &lt;/P&gt;&lt;P&gt;I think this is one you are searching for .&lt;/P&gt;&lt;P&gt;Let me know if it works&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2017 11:54:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-Manage-retention-of-hiveserver2-log-file-by-using/m-p/213165#M175093</guid>
      <dc:creator>akhilsnaik</dc:creator>
      <dc:date>2017-08-08T11:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: [Ambari] Manage retention of hiveserver2.log file by using DailyRollingFileAppender in log4j through Ambari.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Manage-retention-of-hiveserver2-log-file-by-using/m-p/213166#M175094</link>
      <description>&lt;P&gt;Actually, I have done that through Ambari web UI.&lt;/P&gt;&lt;P&gt;However, it didn't work.&lt;/P&gt;&lt;P&gt;Here is what I have done.&lt;/P&gt;&lt;P&gt;Ambari web UI -&amp;gt; Hive -&amp;gt; Configs -&amp;gt; Advanced -&amp;gt; Advanced hive-log4j -&amp;gt; &lt;/P&gt;&lt;P&gt;Hive Log: # of backup files : 7&lt;/P&gt;&lt;P&gt;The "#" is removed from "#log4j.appender.DRFA.MaxBackupIndex={{hive_log_maxbackupindex}}"&lt;/P&gt;&lt;P&gt;After, restarting the hive server, the files placed below are changed.&lt;/P&gt;&lt;P&gt;/etc/hive/conf/hive-log4j.properties&lt;/P&gt;&lt;P&gt;/etc/hive/conf/conf.server/hive-log4j.properties&lt;/P&gt;&lt;P&gt;AFAIK, hiveserver2 uses the seconde file.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2017 12:18:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-Manage-retention-of-hiveserver2-log-file-by-using/m-p/213166#M175094</guid>
      <dc:creator>mungeol_heo</dc:creator>
      <dc:date>2017-08-08T12:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: [Ambari] Manage retention of hiveserver2.log file by using DailyRollingFileAppender in log4j through Ambari.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Manage-retention-of-hiveserver2-log-file-by-using/m-p/213167#M175095</link>
      <description>&lt;P&gt;I don't think "log4j.appender.DRFA.MaxBackupIndex" is working, even though, it is listed in the log4j-hive.properties file by default and commented in Ambari.&lt;/P&gt;&lt;P&gt;I found out there are two options to achieve the similar goal.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Option 1: Customize DailyRollingFileAppender&lt;UL&gt;&lt;LI&gt;Reference: &lt;A href="https://wiki.apache.org/logging-log4j/DailyRollingFileAppender" target="_blank"&gt;https://wiki.apache.org/logging-log4j/DailyRollingFileAppender&lt;/A&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Option 2: Use the TimeBasedRollingPolicy of DailyRollingFileAppender&lt;UL&gt;&lt;LI&gt;Reference: &lt;A href="https://stackoverflow.com/questions/5117758/configuring-rollingfileappender-in-log4j" target="_blank"&gt;https://stackoverflow.com/questions/5117758/configuring-rollingfileappender-in-log4j&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 10 Aug 2017 10:41:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-Manage-retention-of-hiveserver2-log-file-by-using/m-p/213167#M175095</guid>
      <dc:creator>mungeol_heo</dc:creator>
      <dc:date>2017-08-10T10:41:11Z</dc:date>
    </item>
  </channel>
</rss>

