CDH中使用kafka的命令

kafka-topics --create --zookeeper master:2181 --replication-factor 1 --partitions 6 --topic TP_LABEL  
kafka-topics --list --zookeeper master:2181  

kafka-topics --zookeeper master:2181 --alter --topic TP_LABEL --partitions 8  
kafka-console-consumer --zookeeper master:2181 --topic test_topic  
kafka-console-producer --broker-list master:9092 --topic test_topic
kafka-topics --delete --zookeeper master:2181 --topic TP_LABEL  

zookeeper-client  
ls /brokers/topics
rmr /brokers/topics/test_topic
cd /var/local/kafka/data  
rm -rf TP_LABEL-*  

 

上一篇:CDH+Kylin三部曲之二:部署和设置


下一篇:Alluxio集群部署整合CDH(Hive/Spark)