kafka topic 完全删除

 

1.自动删除脚本(得配置server.properties 中 delete.topic.enable=true)

./kafka-topics.sh --zookeeper xxx:2181,xxx:2181,xxx:2181 --topic test --delete
 
  此处可直接手动删除,关闭kafka,删除 log.dirs 配置的目录下的相关topic文件
 
  或者
 ./kafka-topics.sh  --delete --zookeeper 【zookeeper server】  --topic 【topic name】
 

2.删除zookeeper上节点信息(用脚本删除kafka,只是标记删除)

打开client :./zkCli.sh -server 127.0.0.1:2181
查看节点:ls /brokers/topics
删除节点:rmr /brokers/topics/xxx
 
查看假删除节点: ls /admin/delete_topics
删除admin下节点:rmr /admin/delete_topics
 

3.完事后重启kafka

查看 ./kafka-topics.sh --list --zookeeper localhost:2181
 
 
 
 

kafka topic 完全删除的更多相关文章

  1. kafka topic查看删除

    1,查看kafka topic列表,使用--list参数 >bin/kafka-topics.sh --zookeeper 127.0.0.1:2181 --list __consumer_of ...

  2. Kafka如何彻底删除topic及数据

    前言:删除kafka topic及其数据,严格来说并不是很难的操作.但是,往往给kafka 使用者带来诸多问题.项目组之前接触过多个开发者,发现都会偶然出现无法彻底删除kafka的情况.本文总结多个删 ...

  3. 删除kafka topic

    1.因为项目原因,kakfa通道中经常造成数据阻塞,导致kafka通道中数据量过大,因此我需要将kakfa通道中数据清除(个人项目原因,一直使用一个消费者,只要保证当前消费者不在消费之前很久的数据就可 ...

  4. 手动删除Kafka Topic

    一.删除Kafka topic 运行./bin/kafka-topics  --delete --zookeeper [zookeeper server]  --topic [topic name]: ...

  5. 【原创】Kafka topic常见命令解析

    本文着重介绍几个常用的topic命令行命令,包括listTopic,createTopic,deleteTopic和describeTopic等.由于alterTopic并不是很常用,本文中就不涉及了 ...

  6. Kafka Topic Api

    Pom: <dependency> <groupId>org.apache.kafka</groupId> <artifactId>kafka_2.10 ...

  7. Kafka Topic Partition Replica Assignment实现原理及资源隔离方案

    本文共分为三个部分:   Kafka Topic创建方式 Kafka Topic Partitions Assignment实现原理 Kafka资源隔离方案   1. Kafka Topic创建方式 ...

  8. Exception in thread "main" org.I0Itec.zkclient.exception.ZkAuthFailedException: Authentication failure is thrown while creating kafka topic

    Exception in thread "main" org.I0Itec.zkclient.exception.ZkAuthFailedException: Authentica ...

  9. 用canal同步binlog到kafka,spark streaming消费kafka topic乱码问题

    canal 1.1.1版本之后, 默认支持将canal server接收到的binlog数据直接投递到MQ, 目前默认支持的MQ系统有kafka和RocketMQ. 在投递的时候我们使用的是非压平的消 ...

随机推荐

  1. RedHat 6.4源码方式安装mysql5.5

    参考文档:http://dev.mysql.com/downloads/file/?id=463397 下载地址http://dev.mysql.com/doc/refman/5.7/en/ 文档地址 ...

  2. June 02nd 2017 Week 22nd Friday

    A burden of one's choice is not felt. 爱挑的担子不嫌重. When doing things I love to do, I seldom feel tired ...

  3. python入门24 json模块

    现在很多接口传参和响应都是json串. json.dumps()  python对象转化为json字符串 json.loads()  json字符串转化为python对象.[]转变成list,{}转变 ...

  4. Ubuntu环境安装Gradle

    AndroidStudio使用全新的构建系列—–Gradle. 这是官方为什么使用gradle 的理由: Domain Specific Language (DSL) to describe and ...

  5. Android4.4 ContentResolver查询图片无效 及 图库删除 添加图片后,ContentResolver不更新的问题解决

    问题背景: 參考链接 做了一个图片浏览,用ContentResolver扫描图库照片.且严格依照时间拍摄顺序排好序显示在listview里.例如以下图所看到的: watermark/2/text/aH ...

  6. HDU 1083 Courses 【二分图完备匹配】

    传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1083 Courses Time Limit: 20000/10000 MS (Java/Others)  ...

  7. POJ 2771 Guardian of Decency 【最大独立集】

    传送门:http://poj.org/problem?id=2771 Guardian of Decency Time Limit: 3000MS   Memory Limit: 65536K Tot ...

  8. Css 截取字符串长度

    .shortNameShow{ overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowr ...

  9. MySQL单列索引和联合索引

    MySQL单列索引和联合索引   所有的MySQL列类型能被索引.在相关的列上的使用索引是改进SELECT操作性能的最好方法. 一个表最多可有16个索引.最大索引长度是256个字节,尽管这可以在编译M ...

  10. autofac 注册

    1 注册的概念和方式 使用autofac 的ContainerBuilder 来注册组件(components---通常指实现类),并把它的服务(service---通常指接口,抽象类,类实例)暴露给 ...