Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

How to use the tool?

Code Block
.bin/kafka-create-topic.sh

Option                                  Description
------                                  -----------
--partition <Integer: # of partitions>    number of partitions in the topic
                                          (default: 1)

--replica <Integer: replication factor>   replication factor for each partitions
                                          in the topic (default: 1)

--replica-assignment-list                 for manually assigning replicas to brokers
                                          (default: )
                                          <broker_id_for_part1_replica1 :
                                           broker_id_for_part1_replica2,
                                           broker_id_for_part2_replica1 :
                                           broker_id_for_part2_replica2, ...>

--topic <topic>                         REQUIRED: The topic to be created.

--zookeeper <urls>                      REQUIRED: The connection string for
                                          the zookeeper connection in the form
                                          host:port. Multiple URLS can be
                                          given to allow fail-over.

5. AddPartitionCommand Tool

What does the tool do?

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.

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.