欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Kafka 常用命令行詳細(xì)介紹及整理

 更新時間:2016年12月13日 15:57:31   投稿:lqh  
這篇文章主要介紹了 Kafka 常用命令行詳細(xì)介紹及整理的相關(guān)資料,需要的朋友可以參考下

 Kafka 常用命令行詳細(xì)介紹及整理

以下是kafka常用命令行總結(jié):

 
 
1.查看topic的詳細(xì)信息 
./kafka-topics.sh -zookeeper 127.0.0.1:2181 -describe -topic testKJ1 
 
2、為topic增加副本 
./kafka-reassign-partitions.sh -zookeeper 127.0.0.1:2181 -reassignment-json-file json/partitions-to-move.json -execute 
 
3、創(chuàng)建topic 
./kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic testKJ1 
 
4、為topic增加partition 
./bin/kafka-topics.sh –zookeeper 127.0.0.1:2181 –alter –partitions 20 –topic testKJ1 
 
5、kafka生產(chǎn)者客戶端命令 
./kafka-console-producer.sh --broker-list localhost:9092 --topic testKJ1 
 
6、kafka消費(fèi)者客戶端命令 
./kafka-console-consumer.sh -zookeeper localhost:2181 --from-beginning --topic testKJ1 
 
7、kafka服務(wù)啟動 
./kafka-server-start.sh -daemon ../config/server.properties  
 
8、下線broker 
./kafka-run-class.sh kafka.admin.ShutdownBroker --zookeeper 127.0.0.1:2181 --broker #brokerId# --num.retries 3 --retry.interval.ms 60 
shutdown broker 
 
9、刪除topic 
./kafka-run-class.sh kafka.admin.DeleteTopicCommand --topic testKJ1 --zookeeper 127.0.0.1:2181 
./kafka-topics.sh --zookeeper localhost:2181 --delete --topic testKJ1 
 
10、查看consumer組內(nèi)消費(fèi)的offset 
./kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --zookeeper localhost:2181 --group test --topic testKJ1 

感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

相關(guān)文章

最新評論