kafka为topic扩分区

#将分区数量调整为3个

[root@Centos7-Mode-V8 kafka]# bin/kafka-topics.sh --alter --zookeeper 192.168.144.247:3292,192.168.144.251:3292,192.168.144.253:3292 --topic mubai --partitions 3
WARNING: If partitions are increased for a topic that has a key, the partition logic or ordering of the messages will be affecteted

#查看分区

[root@Centos7-Mode-V8 kafka]# bin/kafka-topics.sh --describe --zookeeper 192.168.144.247:3292,192.168.144.251:3292,192.168.144.253:3292 --topic mubai 
Topic:mubai    PartitionCount:3    ReplicationFactor:1    Configs:
    Topic: mubai    Partition: 0    Leader: 0    Replicas: 0    Isr: 0
    Topic: mubai    Partition: 1    Leader: 1    Replicas: 1    Isr: 1
    Topic: mubai    Partition: 2    Leader: 0    Replicas: 0    Isr: 0
 

猜你喜欢

转载自blog.csdn.net/yabignshi/article/details/120441243