-
Notifications
You must be signed in to change notification settings - Fork 145
module reorder
This is another method provided, as an alternative to the elect module, to perform the leader election that works by reordering the replica list to assure that all brokers are leading an equal number of partitions. This tends to provide a more even balance of partitions across the cluster, as Kafka itself does not order the replica list in an ideal manner. The downside of performing this type of reordering is that it is really hard on wildcard consumers, such as kafka-mirror-maker. Each reorder will trigger a rebalance on the consumer, even though the tool does not change leadership of any partition until the very end. This command should be used sparingly.
There are no options for the reorder module.
All examples assume the cluster Zookeeper connect string is zook.example.com:2181/kafka/clustername
Example 1: Perform a preferred replica election in the cluster by reordering replicas
kafka-assigner.py -z zook.example.com:2181/kafka/clustername -e reorder
It's worth repeating that this module can be very hard on wildcard consumers