原
kafka 清除topic数据脚本
-
-
-
param=$1
-
echo "============="
-
echo ${param}
-
-
-
echo "kafka-topics.sh --zookeeper localhost:2181 --delete --topic ${param}"
-
-
kafka-topics.sh --zookeeper localhost:2181 --delete --topic ${param}
-
-
#打印语句
-
echo "kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 2 --partitions 3 --topic ${param}"
-
-
#执行命令
-
kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 2 --partitions 3 --topic ${param}
输入 xxx.sh topicname