kafka集群基本操作

kafka 操作:
关闭kafka:
bin/kafka-server-stop.sh


开启zookeeper:
./zkServer.sh start
开启 kafka:
bin/kafka-server-start.sh config/server.properties &

查看Topic的分区和副本情况:
./kafka-topics.sh --describe --zookeeper localhost:2181 --topic superman

查看kafka状态
echo status | nc localhost 2181

kafka日志:
server.log, controller.log, state-change.log

重启zoopeeper:
./bin/zkServer.sh  config/zookeeper.properties &

扩展分区:
./kafka-topics.sh --alter --zookeeper 192.168.2.199:2181,192.168.2.200:2181,192.168.2.201:2181 --partitions 16 --topic superman

详细学习链接:https://www.cnblogs.com/hukey/p/10763821.html

猜你喜欢

转载自blog.csdn.net/qq_24058965/article/details/100133685