/dev/null 2>&1 &2、刪除Topic:./kafka-run-class.sh kafka.admin.DeleteTopicComman..."/>
您好,登錄后才能下訂單哦!
1、啟動:
nohup ./bin/kafka-server-start.sh config/server.properties > /dev/null 2>&1 &
2、刪除Topic:
./kafka-run-class.sh kafka.admin.DeleteTopicCommand --topic testTopic --zookeeper 192.168.1.101:2181,192.168.1.102:2181,192.168.1.103:2181
3、創(chuàng)建:
./kafka-topics.sh --replication-factor 1 --partition 3 --topic testTopic --zookeeper 192.168.1.101:2181,192.168.1.102:2181,192.168.1.103:2181 --create
4、顯示所有topic:
./kafka-topics.sh --list --zookeeper 192.168.1.101:2181,192.168.1.102:2181,192.168.1.103:2181
5、顯示單個topic情況:
./kafka-topics.sh --describe --topic testTopic --zookeeper 192.168.1.101:2181,192.168.1.102:2181,192.168.1.103:2181
6、發(fā)送信息
./kafka-console-producer.sh --broker-list 192.168.1.101:9092,192.168.1.102:9092,192.168.1.103:9092 --topic testTopic
7、消費信息
./kafka-console-consumer.sh --zookeeper 192.168.1.101:2181,192.168.1.102:2181,192.168.1.103:2181 --from-beginning --topic testTopic
8、查看當前group offset的狀況
./kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --group test-group2015
9、表示將offset置到哪里 [earliest | latest]
./kafka-run-class.sh kafka.tools.UpdateOffsetsInZK latest config/consumer.properties testTopic
10、修改分區(qū)數(shù)量
./kafka-topics.sh --alter --topic testTopic --partitions 34 --zookeeper 192.168.1.101:2181,192.168.1.102:2181,192.168.1.103:2181
免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內容。