Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

what is the safe and best way to delete the kafka topic folders

avatar

on all our kafka machines ( production machines ) , we see that: ( no free space )

df -h /var/kafka 

Filesystem      Size  Used Avail Use% Mounted on

/dev/sdb         11T   11T  2.3M 100% /var/kafka

and under /var/kafka/kafka-logs

we see all topic folders (huge size) as example:

117G hgpo.llo.prmt.processed-28 
117G hgpo.llo.prmt.processed-29 
117G hgpo.llo.prmt.processed-3 
117G hgpo.llo.prmt.processed-30 
117G hgpo.llo.prmt.processed-31 
117G hgpo.llo.prmt.processed-32

what is the best approach to delete the topic/s from the folder /var/kafka/kafka-logs ,

and what are the exactly steps to do so , as stop service before deletion etc .

second important question:

what is the mechanizem that suppose to delete automatically the topics ?

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Expert Contributor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
12 REPLIES 12

avatar
Expert Contributor
@Michael Bronson

As you have deleted the topic it looks like the consumer group is deleted, and you can remove the corresponding topic folders (from all nodes) and also the topic from zookeeper using the ZK CLI.

avatar

just to be sure , so it will be safe to remove the topics use rm-rf as ( rm -rf hgpo.llo.prmt.processed-28 . rm -rf hgpo.llo.prmt.processed-28 and so on on all nodes ) ?

Michael-Bronson

avatar

another thing the topics are exist under /brokers/topics/* and not under /consumers/..../.. so in this case I gues we need to remove the topic as rmr /brokers/topics/hgpo.llo.prmt.processed , can you confirm this please

Michael-Bronson