使用Zookeeper删除Kafka中的topic

有关命令:

  进入zookeeperclient

[root@ComputerNode2 mq]# cd zookeeper/bin
[root@ComputerNode2 bin]# ls
README.txt  zkCleanup.sh  zkCli.cmd  zkCli.sh  zkEnv.cmd  zkEnv.sh  zkServer.cmd  zkServer.sh
[root@ComputerNode2 bin]# ./zkCli.sh 

执行查看topic,删除topics


[zk: localhost:2181(CONNECTED) 0] ls /brokers/topics
[CONF_PERF_INFO, HISTORY_DATA, test, ASSETS_INFO, CMP_INFO, ALERT, __consumer_offsets]
[zk: localhost:2181(CONNECTED) 1] rmr /brokers/topics/ASSETS_INFO
[zk: localhost:2181(CONNECTED) 2] ls /brokers/topics             
[CONF_PERF_INFO, HISTORY_DATA, test, CMP_INFO, ALERT, __consumer_offsets]

kafka monitor界面:

使用Zookeeper删除Kafka中的topic_第1张图片


你可能感兴趣的:(大数据)