kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian McCague <Adrian.McCa...@zopa.com>
Subject Topic deletion
Date Thu, 06 Apr 2017 17:33:12 GMT
Hi all,

I am trying to understand topic deletion in kafka, there appears to be very little documentation
or answers on how this works. Typically they just say to turn on the feature on the broker
(in my case it is).

I executed:
Kafka-topics.bat -delete -zookeeper keeperhere -topic mytopic

Running this again yields:
Topic mytopic is already marked for deletion.

--describe yields:
Topic: mytopic  PartitionCount:6        ReplicationFactor:3     Configs:retention.ms=0
        Topic: mytopic  Partition: 0    Leader: -1      Replicas: 1006,1001,1005        Isr:
        Topic  mytopic  Partition: 1    Leader: -1      Replicas: 1001,1005,1003        Isr:
       Topic: mytopic  Partition: 2    Leader: -1      Replicas: 1005,1003,1004        Isr:
        Topic: mytopic  Partition: 3    Leader: -1      Replicas: 1003,1004,1007        Isr:
        Topic: mytopic  Partition: 4    Leader: -1      Replicas: 1004,1007,1006        Isr:
        Topic: mytopic  Partition: 5    Leader: -1      Replicas: 1007,1006,1001        Isr:

You can see that the deletion mark has meant that the Leader is -1.
Also I read somewhere that retention needs to be set to something low to trigger the deletion,
hence the config of retention.ms=0

Consumers (or streams in my case) no longer see the topic:
org.apache.kafka.streams.errors.TopologyBuilderException: Invalid topology building: stream-thread
[StreamThread-1] Topic not found: mytopic

And I can't create a new topic in its place:
[2017-04-06 18:26:00,702] ERROR org.apache.kafka.common.errors.TopicExistsException: Topic
'mytopic' already exists. (kafka.admin.TopicCommand$)

I am a little lost as to where to go next, could someone explain how topic deletion is actually
applied when a topic is 'marked' for deletion as that may help trigger it.

Thanks!
Adrian


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message