雅虎的kafka-manager最新版的包,及一些常用的kafka指令

启动kafka服务:
bin/kafka-server-start.sh config/server.properties &
停止kafka服务:
bin/kafka-server-stop.sh




创建topic:
bin/kafka-topics.sh --create --zookeeper hadoop002.local:2181,hadoop001.local:2181,hadoop003.local:2181 --replication-factor 2 --partitions 2 --topic test2


删除topic(需要server.properties中设置delete.topic.enable=true否则只是标记删除):
bin/kafka-topics.sh --delete --zookeeper hadoop002.local:2181,hadoop001.local:2181,hadoop003.local:2181 --topic test6


列出所有topic:
bin/kafka-topics.sh --list --zookeeper hadoop002.local:2181,hadoop001.local:2181,hadoop003.local:2181


列出所有topic的详细信息:
bin/kafka-topics.sh --describe --zookeeper hadoop002.local:2181,hadoop001.local:2181,hadoop003.local:2181


hadoop003.local:
bin/kafka-console-producer.sh --broker-list hadoop002.local:9092,hadoop001.local:9092,hadoop003.local:9092 --topic test




hadoop002.local:
bin/kafka-console-consumer.sh --zookeeper hadoop002.local:2181,hadoop001.local:2181,hadoop003.local:2181 --topic test --from-beginning


kafka manager启动命令

nohup bin/kafka-manager -Dconfig.file=/opt/kafka-manager-1.2.3/conf/application.conf -Dhttp.port=9090 &

下载地址:http://download.csdn.net/detail/xiao_jun_0820/8716139




你可能感兴趣的:(雅虎的kafka-manager最新版的包,及一些常用的kafka指令)