liveBook · Manning

Partition reassignment tool

As explained in Apache Kafka in Action

kafka-reassign-partitions.sh is an Apache Kafka command-line utility for reassigning partitions and their replicas, including across multiple topics.

The partition reassignment tool, kafka-reassign-partitions.sh, moves topic partitions and replicas among brokers. It is most useful for complex reassignment plans spanning multiple topics or for redistributing broker load. section 3.1.2 section 3.3

Use the tool when the reassignment needs more flexibility than a topic-level operation provides:

  • Change a topic’s replication factor by assigning replicas to different brokers; the replication factor cannot exceed the broker count. section 3.1.2
  • Redistribute partitions among brokers to balance load while preserving Kafka’s partition-ordering model. section 3.1.2 section 3.3
  • Perform intricate reassignment plans across multiple topics, including automatic redistribution of assignments. section 3.1.2

Balancing replicas across brokers

Suppose several topics need their partitions redistributed because broker load is uneven, or their replication factors must change. Use kafka-reassign-partitions.sh for the multi-topic reassignment rather than relying only on kafka-topics.sh, which may be sufficient for a single topic. section 3.1.2 section 3.3

How Apache Kafka in Action covers it

How deep it goes
Defines the tool’s reassignment role and operational limits but does not provide command syntax or a step-by-step execution procedure.
Examples
Uses changing replication factor, redistributing broker load, and coordinating complex assignments across multiple topics.
What it assumes
Assumes familiarity with Kafka topics, partitions, brokers, replicas, and replication factors.
What you can do after
Operate/configure Kafka by planning complex partition and replica assignments across brokers and topics.
How it connects
Connects partitions with brokers, replicas, replication factor, load distribution, and kafka-topics.sh.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Apache Kafka in Action. The section links point to the parts of the book it draws on.