我创建了一个集群,它有6个代理和代理选项 broker.rack
在Kubernetes。这是我的每个代理的机架配置
| broker | rack |
|--------|--------|
| 0 | rack-0 |
| 1 | rack-1 |
| 2 | rack-2 |
| 3 | rack-0 |
| 4 | rack-1 |
| 5 | rack-2 |
我检查了zookeeper shell是否为所有代理正确调整了此选项
bash-4.4$ zookeeper-shell zookeeper-ceph:2181
get /kafka/brokers/ids/0
{"listener_security_protocol_map":{"PLAINTEXT":"PLAINTEXT"},"endpoints":["PLAINTEXT://XX.XX.XX.XX:9092"],"rack":"rack-0","jmx_port":9393,"host":"XX.XX.XX.XX","timestamp":"1597756840585","port":9092,"version":4}
cZxid = 0x300000ae5
ctime = Tue Aug 18 22:20:40 KST 2020
mZxid = 0x300000ae5
mtime = Tue Aug 18 22:20:40 KST 2020
pZxid = 0x300000ae5
cversion = 0
dataVersion = 1
aclVersion = 0
ephemeralOwner = 0x202ae230e7e0014
dataLength = 212
numChildren = 0
当我创建主题(36分区/3复制因子)时,特定分区中的副本分布均匀,但一个分区中的副本意外地位于同一机架中
经纪人 1
以及 4
在同一机架中( rack-1
),但它们被分配在一个分区中。我认为这种行为和Kafka提案中的提案不一样(https://cwiki.apache.org/confluence/display/kafka/kip-36+rack+aware+replica+assignment)
Kafka的版本是2.3有人能告诉我怎么了吗?
暂无答案!
目前还没有任何答案,快来回答吧!