黑猴子的家:kafka-topic-delete.sh
2022-04-20 本文已影响0人
黑猴子的家
[alex@hadoop102 ~]$ cd /usr/local/bin/
[alex@hadoop102 bin]$ sudo touch kafka-topic-delete.sh
[alex@hadoop102 bin]$ sudo chown alex:alex kafka-topic-delete.sh
[alex@hadoop102 bin]$ chmod 755 kafka-topic-delete.sh
[alex@hadoop102 bin]$ vim kafka-topic-delete.sh
#!/bin/bash
kafka_home=/opt/module/kafka_2.11-0.11.0.2
$kafka_home/bin/kafka-topics.sh --zookeeper hadoop102:2181,hadoop103:2181,hadoop104:2181 --delete --topic $1