Skip to content

module set replication factor

tpalino edited this page Apr 28, 2016 · 4 revisions

Module: Set Replication Factor

The set-replication-factor module assists with fixing the replication factor for a topic. A common use for this is to set the RF for the __consumer_offsets topic when it has been created by the brokers with too few replicas. It can either increase or decrease the number of replicas for partitions in the topic to match the number provided. Additional replicas are chosen from all brokers in the cluster.

Options

The following are the options for this module:

Option Required Argument Default Description
--topic yes string The topic to set the replication for
--replication-factor yes integer The replication factor to set the topic to

Example

All examples assume the cluster Zookeeper connect string is zook.example.com:2181/kafka/clustername

Example 1: Set the replication factor for the __consumers_offset topic to 3

kafka-assigner.py -z zook.example.com:2181/kafka/clustername -e set-replication-factor --topic __consumer_offsets --replication-factor 3

Notes

Clone this wiki locally