...
In Kafka partitions act as the unit of parallelism: messages of a single topic are distributed to multiple partitions that can be stored and served on different servers. Upon creation of a topic, the number of partitions for this topic has to be specified. Later on more partitions may be needed for this topic when the volume of this topic increases. This tool helps to add more partitions for a specific topic and also allow manual replica assignment of the added partitions. This tool is only available in the 0.8 branch for now.
How to use the tool?
Code Block |
---|
bin/kafka-add-partitions.sh Option Description ------ ----------- --partition <Integer: # of partitions> REQUIRED: Number of partitions to add to the topic --replica-assignment-list For manually assigning replicas to <broker_id_for_part1_replica1 : brokers for the new partitions broker_id_for_part1_replica2, (default: ) broker_id_for_part2_replica1 : broker_id_for_part2_replica2, ...> --topic <topic> REQUIRED: The topic for which partitions need to be added. --zookeeper <urls> REQUIRED: The connection string for the zookeeper connection in the form host:port. Multiple URLS can be given to allow fail-over. |