<?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: is it possible to purge topic when kafka broker is down in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198015#M160066</link>
    <description>&lt;P&gt;&lt;EM&gt;&lt;A href="https://community.hortonworks.com/questions/191926/@Michael%20Bronson"&gt;@Michael Bronson&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The manual delete should take care of broker that's down that because you as reiterated you have to shut down the cluster (broker down)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Now about your last question with worries about Kafka02, if you know how Kafka stores partitions then you will realize the for example you have 3 brokers and created a topic with 6 partitions with replication factor 1. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Each cluster will be responsible for 2 partitions. The replication-factor has been set to 1, which means data is not being replicated and the data for a particular partition will only be stored on one server, so here the key is in the replication factor!&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Whats the retention policy? That also plays a role as to whether you consume restart consuming from the beginning! &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You could add new Kafka Brokers to a cluster and move existing topics to new Brokers with all the topics intact? see this HCC &lt;A href="https://community.hortonworks.com/content/supportkb/150063/how-to-add-new-kafka-brokers-to-a-cluster-and-move.html" target="_blank"&gt; Kafka document&lt;/A&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You have to weigh your options to avoid data loss, the reason a kafka deployment should be well thought through DR strategies &lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 17 May 2018 01:27:40 GMT</pubDate>
    <dc:creator>Shelton</dc:creator>
    <dc:date>2018-05-17T01:27:40Z</dc:date>
    <item>
      <title>is it possible to purge topic when kafka broker is down</title>
      <link>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198008#M160059</link>
      <description>&lt;P&gt;we have hadoop cluster with 3 kafka machines we want to purge all the topics in the kafka&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;as the following&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;/usr/hdp/2.6.0.3-8/kafka/bin/kafka-topics.sh --zookeeper master:2181 --alter --topic Topic_Name --config retention.ms=1000
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the problem is that two of the kafka machines have a problem that kafka broker on kafka01/02 restarting all the time , or kafka broker is down on kadka01/03&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;so my question is: can we purge Topics in spite kafka broker is down ?&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 23:33:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198008#M160059</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-05-16T23:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to purge topic when kafka broker is down</title>
      <link>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198009#M160060</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;A href="@Michael Bronson"&gt;@Michael Bronson&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I highly doubt whether you can delete or purge  the topics when the broker is down&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;PURGE topic &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You can  drain the topic by expiring the messages&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;./kafka-topics --zookeeper {ZKADR} --alter --topic topic_name --config retention.ms=1000
./kafka-topics --zookeeper {ZKADR} --alter --topic topic_name --delete-config retention.ms&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;I&gt;&lt;STRONG&gt;How to delete data from topic &lt;/STRONG&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;To delete manually: &lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;I&gt;Shutdown the cluster &lt;/I&gt;&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;Clean kafka log dir (specified by the log.dir attribute in kafka config file ) as well the zookeeper data &lt;/I&gt;&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;Restart the cluster &lt;/I&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;For any given topic what you can do is &lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;I&gt;Stop kafka &lt;/I&gt;&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;Clean kafka log specific to partition, kafka stores its log file in a format of "l&lt;STRONG&gt;ogDir/topic-partition&lt;/STRONG&gt;" so for a topic named "MyTopic" the log for partition id 0 will be stored in &lt;STRONG&gt;/tmp/kafka-logs/MyTopic-0   &lt;/STRONG&gt; where &lt;STRONG&gt;/tmp/kafka-logs&lt;/STRONG&gt; is specified by the &lt;STRONG&gt;log.dir attribute &lt;/STRONG&gt;&lt;/I&gt;&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;Restart kafka&lt;/I&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;Hope that helps &lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 23:59:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198009#M160060</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2018-05-16T23:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to purge topic when kafka broker is down</title>
      <link>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198010#M160061</link>
      <description>&lt;P&gt;regarding "&lt;EM&gt;I highly doubt whether you can delete or purge the topics when the broker is down" , so what we can do ?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;we cant fixed the kafka broker restart , how we can be sure the purge will do the job inspite broker is down?&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 00:06:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198010#M160061</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-05-17T00:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to purge topic when kafka broker is down</title>
      <link>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198011#M160062</link>
      <description>&lt;P&gt;&lt;EM&gt;the reason that we want to purge all topic is because the restart of the kafka broker , many indexes are corupted and maybe log files&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 00:09:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198011#M160062</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-05-17T00:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to purge topic when kafka broker is down</title>
      <link>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198012#M160063</link>
      <description>&lt;P&gt;any option to hold the kafka to stay up ?&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 00:09:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198012#M160063</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-05-17T00:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to purge topic when kafka broker is down</title>
      <link>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198013#M160064</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/1271/sheltong.html"&gt;@Geoffrey&lt;/A&gt; you know any check that fives ok/fail after : or tell us if purge success? &lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;&lt;CODE&gt;/usr/hdp/2.6.0.3-8/kafka/bin/kafka-topics.sh --zookeeper master:2181--alter --topic Topic_Name--config retention.ms=1000&lt;/CODE&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 17 May 2018 00:12:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198013#M160064</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-05-17T00:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to purge topic when kafka broker is down</title>
      <link>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198014#M160065</link>
      <description>&lt;P&gt;just one important note - we have 3 kafka kafka01/03 are have the problem with broker restart but not on kafka02 , so my quastion is can we purge on kafka02 , and this will efected also kafka01/03 &lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 00:23:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198014#M160065</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-05-17T00:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to purge topic when kafka broker is down</title>
      <link>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198015#M160066</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;A href="https://community.hortonworks.com/questions/191926/@Michael%20Bronson"&gt;@Michael Bronson&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The manual delete should take care of broker that's down that because you as reiterated you have to shut down the cluster (broker down)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Now about your last question with worries about Kafka02, if you know how Kafka stores partitions then you will realize the for example you have 3 brokers and created a topic with 6 partitions with replication factor 1. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Each cluster will be responsible for 2 partitions. The replication-factor has been set to 1, which means data is not being replicated and the data for a particular partition will only be stored on one server, so here the key is in the replication factor!&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Whats the retention policy? That also plays a role as to whether you consume restart consuming from the beginning! &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You could add new Kafka Brokers to a cluster and move existing topics to new Brokers with all the topics intact? see this HCC &lt;A href="https://community.hortonworks.com/content/supportkb/150063/how-to-add-new-kafka-brokers-to-a-cluster-and-move.html" target="_blank"&gt; Kafka document&lt;/A&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You have to weigh your options to avoid data loss, the reason a kafka deployment should be well thought through DR strategies &lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 01:27:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198015#M160066</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2018-05-17T01:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to purge topic when kafka broker is down</title>
      <link>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198016#M160067</link>
      <description>&lt;P&gt;regarding to "&lt;I&gt;&lt;STRONG&gt;How to delete data from topic" can we get step by step procedure . as you know we not want to delete the Topic or Topic partitions , &lt;/STRONG&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 02:58:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198016#M160067</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-05-17T02:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to purge topic when kafka broker is down</title>
      <link>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198017#M160068</link>
      <description>&lt;P&gt;regardint "&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;Clean kafka log dir (specified by the log.dir attribute in kafka config file ) as well the zookeeper data"&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;do you mean to delete all 00000000000000000000.index  00000000000000000000.log  00000000000000000000.timeindex from /var/kafka/kafka-logs/  ?&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 03:09:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198017#M160068</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-05-17T03:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to purge topic when kafka broker is down</title>
      <link>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198018#M160069</link>
      <description>&lt;P&gt;and about - "&lt;I&gt;as well the zookeeper data"  , how to do this?&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 03:10:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/is-it-possible-to-purge-topic-when-kafka-broker-is-down/m-p/198018#M160069</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-05-17T03:10:23Z</dc:date>
    </item>
  </channel>
</rss>

