kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Chen <tnac...@gmail.com>
Subject Re: delete topic ?
Date Thu, 07 Aug 2014 06:53:24 GMT
Hi Gwen,

That is a very confusing error message for sure, feel free to file a
jira for both the experience cases.

But in general how delete topic works is that it creates a entry in
the delete_topic zk path, and the leader has a delete topic thread
that watches that path and starts the topic deletion once it receives
the message. It then requires rounds of coordination among all the
brokers that has partitions for the topic to delete all the
partitions, then finally delete the topic from zk.

Therefore once the deletion finishes it will also deleted from zk. The
topic command can definitely however join the topic list with the
delete topic list and mark the ones being deleted with a special


On Wed, Aug 6, 2014 at 11:20 PM, Gwen Shapira <gshapira@cloudera.com> wrote:
> Hi Timothy,
> While we are on the subject, few questions/comments (based on the
> trunk implementation of delete topic command):
> * After deleting a topic, I still see it when listing topics. Is the
> expected behavior? Should it disappear after some time?
> * When does the actual deletion gets triggered?
> * If I try to delete a topic twice I get a pretty confusing exception
> (Node exists from zkclient). It will be nice to catch this and say
> "Topic is being deleted" or something to this effect.
> * Even nicer if list topics command will mark topics as "being deleted".
> I'll probably open a separate Jira for the "nice" behavior, but
> interested in hearing your thoughts.
> Gwen
> On Wed, Aug 6, 2014 at 11:01 PM, Timothy Chen <tnachen@gmail.com> wrote:
>> Is this the latest master? I've added the delete option in trunk, but
>> it's not in any release yet.
>> We used to have the delete option flag but I believe we removed it
>> that's why the documentation difference.
>> Tim
>> On Wed, Aug 6, 2014 at 10:53 PM, Shlomi Hazan <shlomi@viber.com> wrote:
>>> if the answer is pointing out the 'chroot', as a word, it makes no
>>> difference. the result is the same:
>>> kafka/bin/kafka-topics.sh --zookeeper localhost:2181/chroot --delete
>>> --topic topic-3
>>> gives the same:
>>> "Command must include exactly one action: --list, --describe, --create or
>>> --alter..."
>>> or should I write something instead of "chroot"?
>>> On Wed, Jun 18, 2014 at 2:06 PM, Shlomi Hazan <shlomi@viber.com> wrote:
>>>> Hi,
>>>> Doing some evaluation testing, and accidently create a queue with wrong
>>>> replication factor.
>>>> Trying to delete as in:
>>>> kafka_2.10- --zookeeper localhost:2181 --delete
>>>> --topic replicated-topic
>>>> Yeilded:
>>>> Command must include exactly one action: --list, --describe, --create or
>>>> –alter
>>>> Event though this page (https://kafka.apache.org/documentation.html) says:
>>>> And finally deleting a topic:
>>>>  > bin/kafka-topics.sh --zookeeper zk_host:port/chroot --delete --topic
>>>> WARNING: Delete topic functionality is beta in 0.8.1. Please report any
>>>> bugs that you encounter on themailing list <%20users@kafka.apache.org>
>>>> JIRA <https://issues.apache.org/jira/browse/KAFKA>.
>>>> Kafka does not currently support reducing the number of partitions for a
>>>> topic or changing the replication factor.
>>>> What should I do?
>>>> Shlomi

View raw message