简体   繁体   English

卡夫卡复制因子增加后的问题

[英]Kafka Replication factor increase post issue

I am using a 3 broker Kafka cluster in prod. 我在产品中使用3个经纪人Kafka集群。 Earlier the replication factor was 2 . 较早的复制因子是2。 Now I want to increase the replication factor to 3. I have executed the kafka-reassignment-partions.sh file and it go executed successfully. 现在,我想将复制因子增加到3。我已经执行了kafka-reassignment-partions.sh文件,它已成功执行。 Post execution when I am executing the describe command it is showing 3 brokers in the ISR list , but for all partions , I am having the same leader (Broker 1 as the Leader). 执行后,当我执行describe命令时,它在ISR列表中显示3个代理,但是对于所有部分,我都具有相同的领导者(作为领导者的经纪人为1)。

Please suggest 请建议

As far as I know the order you put in the "replicas" field reflect which broker will be the leader for that partition so have the same [1,2,3] sequence for all the partitions and broker 1 is always in the same first position so it will be the leader for that partition. 据我所知,您在“副本”字段中输入的顺序反映了哪个代理将成为该分区的领导者,因此所有分区具有相同的[1,2,3]顺序,并且代理1始终位于同一位置位置,因此它将成为该分区的领导者。 You should change that order putting in the first position the broker-id you want being the leader for the corresponding partition. 您应该更改该顺序,将要作为相应分区的领导者的经纪人ID放在第一位。 After that you have to run the preferred replica election tool. 之后,您必须运行首选的副本选择工具。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM