admin管理员组文章数量:1130349
首先关闭当前topic的生产者与消费者,确保topic不再被使用,否则据说会有bug
进入kafka的目录:
cd ~/software/kafka_2.12-2.7.1/bin
查看当前的全部topic:
./kafka-topics.sh --list --zookeeper localhost:2181
删除这个topic:
./kafka-topics.sh --zookeeper localhost:2181 --delete --topic topic的名称
如果出现报错:Topic xxxx is marked for deletion.Note: This will have no impact if delete.topic.enable is not set to true.
则需要修改server.properties文件:
cd ../config/
vim server.properties
然后写入(注意原始文件是没有这个配置的,需要在新的一行里写入这个配置):
delete.topic.enable=true
首先关闭当前topic的生产者与消费者,确保topic不再被使用,否则据说会有bug
进入kafka的目录:
cd ~/software/kafka_2.12-2.7.1/bin
查看当前的全部topic:
./kafka-topics.sh --list --zookeeper localhost:2181
删除这个topic:
./kafka-topics.sh --zookeeper localhost:2181 --delete --topic topic的名称
如果出现报错:Topic xxxx is marked for deletion.Note: This will have no impact if delete.topic.enable is not set to true.
则需要修改server.properties文件:
cd ../config/
vim server.properties
然后写入(注意原始文件是没有这个配置的,需要在新的一行里写入这个配置):
delete.topic.enable=true
版权声明:本文标题:kafka单机模式删除某一个topic的数据,并解决Topic xxxx is marked for deletion....报错 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/jiaocheng/1754581526a2704054.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论