Skip to Content
Kafka权威指南
book

Kafka权威指南

by Neha Narkhede, Gwen Shapira, Todd Palino
January 2018
Beginner to intermediate
234 pages
7h 8m
Chinese
Posts & Telecom Press
Content preview from Kafka权威指南
158
9
(1)
发起重分配请求(创建
Zookeeper
节点)。
(2)
集群控制器将分区添加到
broker
上。
(3)
新的
broker
开始复制分区,直到副本达到同步状态。
(4)
集群控制器从分区副本清单里移除旧的
broker
因为分区重分配是并行进行的,所以一般情况下没有理由取消一个正在进行中的重分配
任务。不过有一个例外的情况,比如在重分配进行到一半时,
broker
发生了故障并且无
法立即重启,这会导致重分配过程无法结束,进而妨碍其他重分配任务的进行(比如将
故障
broker
的分区分配给其他
broker
)。如果发生了这种情况,可以让集群忽略这个重分
配任务。
移除一个进行中的分区重分配任务的步骤如下。
(1)
Zookeeper
上删除 /admin/reassign_partitions 节点。
(2)
重新选举控制器(参见
9.7.1
)。
检查复制系数
在取消进行中的分区重分配任务时,对于任何一个未完成重分配的分区来
说,旧的
broker
都不会从副本清单里移除。也就是说,有些分区的复制系数
会比正常的大。如果主题的分区包含不一致的复制系数,那么
broker
是不允
许对其进行操作的(比如增加分区)。所以建议检查分区是否仍然可用,并
确保分区的复制系数是正确的。
9.7.3
 移除待删除的主题
在使用命令行工具删除主题时,命令行工具会在
Zookeeper
上创建一个节点作为删除主题
的请求。在正常情况下,集群会立即执行这个请求。不过,命令行工具并不知道集群是否
启用了主题删除功能。因此,如果集群没有启用主题删除功能 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

精通機器學習

精通機器學習

Aurélien Géron
精通特征工程

精通特征工程

Alice Zheng, Amanda Casari
高效能PYTHON程式設計

高效能PYTHON程式設計

Micha Gorelick, Ian Ozsvald

Publisher Resources

ISBN: 9787115473271