<?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: kafka logs + how to limit the logs size in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205313#M68856</link>
    <description>&lt;P&gt;  Kafka Controller Log: backup and Kafka Log: backup file -   size is 256M &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;</description>
    <pubDate>Tue, 03 Oct 2017 14:45:24 GMT</pubDate>
    <dc:creator>mike_bronson7</dc:creator>
    <dc:date>2017-10-03T14:45:24Z</dc:date>
    <item>
      <title>kafka logs + how to limit the logs size</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205310#M68853</link>
      <description>&lt;P&gt;in our ambari cluster ( version 2.6 ) &lt;/P&gt;&lt;P&gt;
we have masters machines and workers machines&lt;/P&gt;&lt;P&gt;
while kafka installed on the master machines &lt;/P&gt;&lt;P&gt;the partition &lt;STRONG&gt;/data&lt;/STRONG&gt; is only &lt;STRONG&gt;15G &lt;/STRONG&gt;and kafka log folder is - &lt;STRONG&gt; /data/vars/kafka/kafka-logs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; most of the folders under&lt;STRONG&gt;  /data/vars/kafka/kafka-logs&lt;/STRONG&gt; are with size &lt;STRONG&gt;4K-40K &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;but two folders are very huge size - &lt;STRONG&gt;5G-7G&lt;/STRONG&gt; , and this cause &lt;STRONG&gt;/data&lt;/STRONG&gt; to be 100%  &lt;/P&gt;&lt;P&gt;example: &lt;/P&gt;&lt;P&gt;under &lt;STRONG&gt;/data/vars/kafka/kafka-logs/mmno.aso.prpl.proces-90&lt;/STRONG&gt; folder:&lt;/P&gt;&lt;P&gt;-rw-r--r-- 1 kafka hadoop 1073037840 Oct  2 14:05 00000000000000000000.log&lt;/P&gt;&lt;P&gt;
-rw-r--r-- 1 kafka hadoop       9480 Oct  2 14:05 00000000000000000000.index &lt;/P&gt;&lt;P&gt;-rw-r--r-- 1 kafka hadoop      13596 Oct  2 14:05 00000000000000000000.timeindex &lt;/P&gt;&lt;P&gt;-rw-r--r-- 1 kafka hadoop 1073464387 Oct  2 14:45 00000000000001419960.log &lt;/P&gt;&lt;P&gt;-rw-r--r-- 1 kafka hadoop       9632 Oct  2 14:45 00000000000001419960.index &lt;/P&gt;&lt;P&gt;-rw-r--r-- 1 kafka hadoop      14412 Oct  2 14:45 00000000000001419960.timeindex &lt;/P&gt;&lt;P&gt;-rw-r--r-- 1 kafka hadoop 1073132221 Oct  2 15:23 00000000000002840641.log&lt;/P&gt;&lt;P&gt;du -sh * &lt;/P&gt;&lt;P&gt;12K     00000000000000000000.index &lt;/P&gt;&lt;P&gt;1.0G    00000000000000000000.log   &amp;lt;---   &lt;/P&gt;&lt;P&gt;is it possible to limit the size of the logs? or other solution ? ( some variables from the ambari GUI that need to add or to reconfigure ?  )&lt;/P&gt;&lt;P&gt;kafka have small  &lt;STRONG&gt;/data&lt;/STRONG&gt; folder and logs should not be with 1G size , how to solve it?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 13:46:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205310#M68853</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-10-03T13:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: kafka logs + how to limit the logs size</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205311#M68854</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@uri ben-ari&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Check if you are running Kafka with DEBUG mode. It can generate tons of logs.&lt;/P&gt;&lt;P&gt;You can modify these settings under Kafka -&amp;gt; Configs -&amp;gt; Advanced Kafka-log4j&lt;/P&gt;&lt;P&gt;set log4j.rootLogger=INFO, stdout&lt;/P&gt;&lt;P&gt;Additionally check&lt;/P&gt;&lt;P&gt;Kafka Controller Log: # of backup files, Kafka Controller Log: # of backup file size, Kafka Log: # of backup files, Kafka Log: # of backup file size&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 14:34:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205311#M68854</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2017-10-03T14:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: kafka logs + how to limit the logs size</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205312#M68855</link>
      <description>&lt;P&gt;log4j.rootLogger=INFO, stdout ( already set ) in my ambari cluster , what chuld be else ? &lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 14:42:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205312#M68855</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-10-03T14:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: kafka logs + how to limit the logs size</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205313#M68856</link>
      <description>&lt;P&gt;  Kafka Controller Log: backup and Kafka Log: backup file -   size is 256M &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 14:45:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205313#M68856</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-10-03T14:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: kafka logs + how to limit the logs size</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205314#M68857</link>
      <description>&lt;P&gt;  Kafka Controller Log: # of backup files   - 20  &lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 14:45:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205314#M68857</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-10-03T14:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: kafka logs + how to limit the logs size</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205315#M68858</link>
      <description>&lt;P&gt;  Kafka Log: # of backup files - 20  &lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 14:46:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205315#M68858</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-10-03T14:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: kafka logs + how to limit the logs size</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205316#M68859</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@uri ben-ari&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Yes, thats possible provided following :&lt;/P&gt;&lt;P&gt;Partitions : &lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;Increase the partitions will keep the data in different log files which also gives the benefit of increased parallelism along with reducing the log file size(increases the number of files)&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;at the same this will not reduce the data volume in disk, but split into multiple files.&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;Prcedure to increase the partition :&lt;/P&gt;&lt;PRE&gt;# Add new option or change exsiting option 

bin/kafka-configs.sh --alter --zookeeper &amp;lt;Zookeeper_server&amp;gt;:2181 --entity-name &amp;lt;topicName&amp;gt; --entity-type topics --add-config cleanup.policy=compact&lt;/PRE&gt;&lt;P style="margin-left: 20px;"&gt;and then ensure that Partition reassignment script executed with &lt;STRONG&gt;--execute &lt;/STRONG&gt;option&lt;/P&gt;&lt;PRE&gt;bin/kafka-reassign-partitions.sh&lt;/PRE&gt;&lt;P style="margin-left: 20px;"&gt;more on these utilities with syntax and examples can be found &lt;A href="https://cwiki.apache.org/confluence/display/KAFKA/Replication+tools#Replicationtools-2.3AddPartitiontoTopic"&gt;here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Data Retention :&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;If you don't need to hold the data, that can be purged after reached the retention&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;this can be set while the topic creation time with the --config option retention.bytes or retention.ms &lt;/P&gt;&lt;PRE&gt;#Example bin/kafka-configs.sh --zookeeper &amp;lt;zookeeper_server&amp;gt;:2181 --entity-type topics --alter --add-config retention.ms=86400000 --entity-name &amp;lt;topic_name&amp;gt;&lt;/PRE&gt;&lt;P style="margin-left: 20px;"&gt;&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;Hope this helps!!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 14:53:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205316#M68859</guid>
      <dc:creator>bkosaraju</dc:creator>
      <dc:date>2017-10-03T14:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: kafka logs + how to limit the logs size</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205317#M68860</link>
      <description>&lt;P&gt;how to find the - Zookeeper_server value and the topicName value?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 15:09:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205317#M68860</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-10-03T15:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: kafka logs + how to limit the logs size</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205318#M68861</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@uri ben-ari&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;zookeeper name can be found from ambari (can any of the zookeeper server )&lt;/P&gt;&lt;P&gt;Kafka topic name is the directory name without the partition index  (after Kafka-logs ex : &lt;STRONG&gt;mmno.aso.prpl.proces &lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;on the other note : logs are Kafka messages, not the application logs hence please look for the option to reduce the retention of the topic so that will purge some of the un-used messages from topic.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 15:28:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/kafka-logs-how-to-limit-the-logs-size/m-p/205318#M68861</guid>
      <dc:creator>bkosaraju</dc:creator>
      <dc:date>2017-10-03T15:28:53Z</dc:date>
    </item>
  </channel>
</rss>

