配置
向一个 3 台 机器的 Kafka 集群中创建 1 万个 topic,然后分别观察 /home/vagrant/kafka/kafka-logs
目录中的实际数据,
可见数据基本是均分的:
# 192.168.33.10
[vagrant@Kafka-1 kafka-logs]$ pwd
/home/vagrant/kafka/kafka-logs
[vagrant@Kafka-1 kafka-logs]$ ll | grep topic | wc -l
3344
# 192.168.33.11
[vagrant@Kafka-2 kafka-logs]$ pwd
/home/vagrant/kafka/kafka-logs
[vagrant@Kafka-2 kafka-logs]$ ll | grep topic | wc -l
3353
# 192.168.33.12
[vagrant@Kafka-3 kafka-logs]$ pwd
/home/vagrant/kafka/kafka-logs
[vagrant@Kafka-3 kafka-logs]$ ll | grep topic | wc -l
3303
Comments