Kafka基础操作命令
#创建topic
kafka-topics --zookeeper hdtest3:2181 --topic testTopic --replication-factor 1 --partitions 3 --create
#查看topic
kafka-topics --list --zookeeper hdtest3:2181
#topic生产者
kafka-console-producer --broker-list hdtest3:9092 --topic testTopic
#topic消费者
kafka-console-consumer --zookeeper hdtest3:2181 --topic testTopic
#删除topic
kafka-topics.sh --delete --zookeeper hdtest3:2181 --topic testTopic
查看topic的分区情况
kafka-topics --describe --zookeeper hadoop1:2181