简体   繁体   English

Kafka不会将主题复制到创建该主题时未分配给该主题的经纪人吗?

[英]Kafka does not replicate a topic to thoes brokers which were not assigned to the topic when it was created?

I have a topic "reptop" with replication factor 3. My cluster consist of 4 brokers [IDs: 0,1,2,3]. 我有一个具有复制因子3的主题“ reptop”。我的集群包含4个代理[ID:0、1、2、3]。 When the topic was created brokers 0,2 and 3 were assigned to the topic, with leader as '2', now when one of my brokers, leader or follower goes down Kafka does not replicate the topic to broker:1 even though it is healthy and the ISR is less than replication-factor, but when the broker which had gone down and was initially assigned to the topic, comes back up kafka replicates the topic to this node. 创建主题后,将代理人0,2和3分配给该主题,领导者为'2',现在当我的代理人,领导者或关注者之一退出时,Kafka不会将该主题复制到代理人:1,即使它是运行状况良好,ISR小于复制因子,但是当发生故障并最初分配给该主题的代理重新启动时,kafka将将该主题复制到此节点。 So the question is why does the kafka not replicate the topic to the brokers that were not assigned the topic when the topic was created even though there are healthy brokers on the cluster and "ISR 因此,问题在于,即使在集群上存在健康的中间人和“ ISR”,当主题创建时,kafka为何也不会将该主题复制到未分配主题的中间人

This is by design. 这是设计使然。 If you want to reassign the partitions, you must do so with the reassignment tool. 如果要重新分配分区,则必须使用重新分配工具。 Another option is to bring up a new broker instance with the missing ID. 另一个选择是使用缺少的ID来启动新的代理实例。 Kafka does not "self heal" like say hdfs and there are many cases where you wouldn't want it to. Kafka不会像hdfs那样“自我修复”,并且在许多情况下您不希望这样做。 If you want it to, there are told out there like confluent rebalancer that can be used. 如果您愿意,那里会告诉您类似可以使用的融合式平衡器。

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

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