<?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: how to rotate gc files for ambari services in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219611#M82052</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt; &lt;/P&gt;&lt;P&gt;For Kafka its not even enabled GC logging I guess - hence you can ignore that part. but you can set that like below.&lt;/P&gt;&lt;P&gt;In kafka-env section,&lt;/P&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;export KAFKA_KERBEROS_PARAMS="-Djavax.security.auth.useSubjectCredsOnly=false&lt;/P&gt;&lt;P&gt;to:&lt;/P&gt;&lt;P&gt;export KAFKA_KERBEROS_PARAMS="-Djavax.security.auth.useSubjectCredsOnly=false &lt;STRONG&gt;-XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you satisfied with answers then please mark my comment as correct answer. this will help others as well.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Aug 2018 05:36:05 GMT</pubDate>
    <dc:creator>apappu</dc:creator>
    <dc:date>2018-08-14T05:36:05Z</dc:date>
    <item>
      <title>how to rotate gc files for ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219600#M82041</link>
      <description>&lt;P&gt;on the following answer , we have explain how to rotate &lt;STRONG&gt;gc.log&lt;/STRONG&gt; ( logs ) for metrics collector service &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/194534/automatic-deletion-of-rotated-gclog-files.html" target="_blank"&gt;https://community.hortonworks.com/questions/194534/automatic-deletion-of-rotated-gclog-files.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Now we need to do the same on the following services&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HDFS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;KAFKA&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;what should be the approach on that services ?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 02:08:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219600#M82041</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-08-14T02:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to rotate gc files for ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219601#M82042</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can follow same approach - those are JVM parameters and it should work for any service. you can add these parameters in env template in ambari for any of those services.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;-XX:+UseGCLogFileRotation-XX:NumberOfGCLogFiles=5-XX:GCLogFileSize=2M&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Tue, 14 Aug 2018 02:19:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219601#M82042</guid>
      <dc:creator>apappu</dc:creator>
      <dc:date>2018-08-14T02:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to rotate gc files for ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219602#M82043</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/11311/apappu.html"&gt;amarnath reddy pappu&lt;/A&gt; &lt;/P&gt;&lt;P&gt;the problem is that I not sure what is JVM parameters variable for HDFS and kafka &lt;/P&gt;&lt;P&gt;- which Variable I need to search ? if not defined should I add this variable ? &lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 02:24:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219602#M82043</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-08-14T02:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to rotate gc files for ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219603#M82044</link>
      <description>&lt;P&gt;this is what we have in kafka-end ( in ambari GUI )&lt;/P&gt;&lt;PRE&gt;#!/bin/bash
# Set KAFKA specific environment variables here.
# The java implementation to use.
export JAVA_HOME={{java64_home}}
export PATH=$PATH:$JAVA_HOME/bin
export PID_DIR={{kafka_pid_dir}}
export LOG_DIR={{kafka_log_dir}}
export KAFKA_KERBEROS_PARAMS={{kafka_kerberos_params}}
export JMX_PORT=9997
# Add kafka sink to classpath and related depenencies
if [ -e "/usr/lib/ambari-metrics-kafka-sink/ambari-metrics-kafka-sink.jar" ]; then
  export CLASSPATH=$CLASSPATH:/usr/lib/ambari-metrics-kafka-sink/ambari-metrics-kafka-sink.jar
  export CLASSPATH=$CLASSPATH:/usr/lib/ambari-metrics-kafka-sink/lib/*
fi
if [ -f /etc/kafka/conf/kafka-ranger-env.sh ]; then
. /etc/kafka/conf/kafka-ranger-env.sh
fi&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Aug 2018 02:39:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219603#M82044</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-08-14T02:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to rotate gc files for ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219604#M82045</link>
      <description>&lt;P&gt;this is what we have in hadoop-end from amabri GUI in HDFS service&lt;/P&gt;&lt;PRE&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/86458-hadoop-env-hdfs.txt"&gt;hadoop-env-hdfs.txt&lt;/A&gt;&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Aug 2018 02:42:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219604#M82045</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-08-14T02:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to rotate gc files for ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219605#M82046</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/11311/apappu.html"&gt;amarnath reddy pappu&lt;/A&gt; regarding my details above , can you suggest with which variable I can use in order to set the properties ? , of maybe I need to append variable that represented the - JVM parameters , if yes what is the name of the variable ? &lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 03:21:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219605#M82046</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-08-14T03:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to rotate gc files for ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219606#M82047</link>
      <description>&lt;P&gt;&lt;EM&gt;what we are thinking but we are not sure is that:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;for kafka &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;KAFKA_GC_LOG_OPTS="-XX:+UseGCLogFileRotation-XX:NumberOfGCLogFiles=5-XX:GCLogFileSize=2M"&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;for hdfs &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;JAVA_OPTS="-XX:+UseGCLogFileRotation-XX:NumberOfGCLogFiles=5-XX:GCLogFileSize=2M"&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Aug 2018 03:33:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219606#M82047</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-08-14T03:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to rotate gc files for ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219607#M82048</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt; &lt;/P&gt;&lt;P&gt;For HDFS to GC there would be below config/property&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-XX:+PrintGCDetails&lt;/STRONG&gt; -XX:+PrintGCTimeStamps&lt;/P&gt;&lt;P&gt;Next to that you can append &lt;/P&gt;&lt;P&gt;like below&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-XX:+PrintGCDetails&lt;/STRONG&gt; -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M&lt;/P&gt;&lt;P&gt;Note: you need to have space between each parameter.&lt;/P&gt;&lt;P&gt;For Kafka - can you tell me how did you enable the GC logging? by default it may not have been enabled - &lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 03:44:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219607#M82048</guid>
      <dc:creator>apappu</dc:creator>
      <dc:date>2018-08-14T03:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to rotate gc files for ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219608#M82049</link>
      <description>&lt;PRE&gt;Not understand about the HDFS , why not put all properties in variable as KAFKA_GC_LOG_OPTS="-XX:+UseGCLogFileRotation-XX:NumberOfGCLogFiles=5-XX:GCLogFileSize=2M"&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Aug 2018 04:01:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219608#M82049</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-08-14T04:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to rotate gc files for ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219609#M82050</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Just adding KAFKA_GC_LOG_OPTS="-XX:+UseGCLogFileRotation-XX:NumberOfGCLogFiles=5-XX:GCLogFileSize=2M" will not be sufficient - will have to use that variable during the service start.&lt;/P&gt;&lt;P&gt;Regarding HDFS:&lt;/P&gt;&lt;P&gt;In hadoop-env template wherever you find &lt;STRONG&gt;-XX:+PrintGCDetails &lt;/STRONG&gt;parameter you can add -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M&lt;/P&gt;&lt;P&gt;For example: &lt;/P&gt;&lt;P&gt;From:&lt;/P&gt;&lt;P&gt;HADOOP_JOBTRACKER_OPTS="-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}"&lt;/P&gt;&lt;P&gt;To:&lt;/P&gt;&lt;P&gt;HADOOP_JOBTRACKER_OPTS="-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails &lt;STRONG&gt;-XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M &lt;/STRONG&gt;-XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}"&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 05:03:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219609#M82050</guid>
      <dc:creator>apappu</dc:creator>
      <dc:date>2018-08-14T05:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to rotate gc files for ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219610#M82051</link>
      <description>&lt;PRE&gt;for HDFS now its more clear , but for kafka , where I need to set the "-XX:+UseGCLogFileRotation-XX:NumberOfGCLogFiles=5-XX:GCLogFileSize=2M"  ?&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Aug 2018 05:23:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219610#M82051</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-08-14T05:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to rotate gc files for ambari services</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219611#M82052</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt; &lt;/P&gt;&lt;P&gt;For Kafka its not even enabled GC logging I guess - hence you can ignore that part. but you can set that like below.&lt;/P&gt;&lt;P&gt;In kafka-env section,&lt;/P&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;export KAFKA_KERBEROS_PARAMS="-Djavax.security.auth.useSubjectCredsOnly=false&lt;/P&gt;&lt;P&gt;to:&lt;/P&gt;&lt;P&gt;export KAFKA_KERBEROS_PARAMS="-Djavax.security.auth.useSubjectCredsOnly=false &lt;STRONG&gt;-XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you satisfied with answers then please mark my comment as correct answer. this will help others as well.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 05:36:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-rotate-gc-files-for-ambari-services/m-p/219611#M82052</guid>
      <dc:creator>apappu</dc:creator>
      <dc:date>2018-08-14T05:36:05Z</dc:date>
    </item>
  </channel>
</rss>

