OS Manuals

/usr/bin/kafka-reassign-partitions.sh

Community edition of Confluent Kafka.

From confluent-kafka 8.5.0.454-r0 (enterprise-packages), captured 2026-11-09 by running kafka-reassign-partitions.sh --help (exit 1). permalink

This tool helps to move topic partitions between replicas.
Option                                  Description
------                                  -----------
--additional                            Execute this reassignment in addition
                                          to any other ongoing ones. This
                                          option can also be used to change
                                          the throttle of an ongoing
                                          reassignment.
--bootstrap-controller [String:         The controller to use for
  bootstrap controller to connect to]     reassignment. By default, the tool
                                          will get the quorum controller. This
                                          option supports the actions --cancel
                                          and --list.
--bootstrap-server [String: Server(s)   the server(s) to use for bootstrapping.
  to use for bootstrapping]
--broker-list <String: brokerlist>      The list of brokers to which the
                                          partitions need to be reassigned in
                                          the form "0,1,2". This is required
                                          if --topics-to-move-json-file is
                                          used to generate reassignment
                                          configuration
--cancel                                Cancel an active reassignment.
--command-config <String: Admin client  Property file containing configs to be
  property file>                          passed to Admin Client.
--disable-rack-aware                    Disable rack aware replica assignment
--disallow-replication-factor-change    Denies the ability to change a
                                          partition's replication factor as
                                          part of this reassignment through
                                          adding validation against it.
--execute                               Kick off the reassignment as specified
                                          by the --reassignment-json-file
                                          option.
--generate                              Generate a candidate partition
                                          reassignment configuration. Note
                                          that this only generates a candidate
                                          assignment, it does not execute it.
--help                                  Print usage information.
--list                                  List all active partition
                                          reassignments.
--preserve-throttles                    Do not modify broker or topic
                                          throttles.
--reassignment-json-file <String:       The JSON file with the partition
  manual assignment json file path>       reassignment configurationThe format
                                          to use is -
                                        {"partitions":
                                        	[{"topic": "foo",
                                        	  "partition": 1,
                                        	  "replicas": [1,2,3],
                                        	  "log_dirs": ["dir1","dir2","dir3"]
                                          }],
                                        "version":1
                                        }
                                        Note that "log_dirs" is optional. When
                                          it is specified, its length must
                                          equal the length of the replicas
                                          list. The value in this list can be
                                          either "any" or the absolution path
                                          of the log directory on the broker.
                                          If absolute log directory path is
                                          specified, the replica will be moved
                                          to the specified log directory on
                                          the broker.
--replica-alter-log-dirs-throttle       The movement of replicas between log
  <Long: replicaAlterLogDirsThrottle>     directories on the same broker will
                                          be throttled to this value
                                          (bytes/sec). This option can be
                                          included with --execute when a
                                          reassignment is started, and it can
                                          be altered by resubmitting the
                                          current reassignment along with the
                                          --additional flag. The throttle rate
                                          should be at least 1 KB/s. (default:
                                          -1)
--throttle <Long: throttle>             The movement of partitions between
                                          brokers will be throttled to this
                                          value (bytes/sec). This option can
                                          be included with --execute when a
                                          reassignment is started, and it can
                                          be altered by resubmitting the
                                          current reassignment along with the
                                          --additional flag. The throttle rate
                                          should be at least 1 KB/s. (default:
                                          -1)
--timeout <Long: timeout>               The maximum time in ms to wait for log
                                          directory replica assignment to
                                          begin. (default: 10000)
--topics-to-move-json-file <String:     Generate a reassignment configuration
  topics to reassign json file path>      to move the partitions of the
                                          specified topics to the list of
                                          brokers specified by the --broker-
                                          list option. The format to use is -
                                        {"topics":
                                        	[{"topic": "foo"},{"topic": "foo1"}],
                                        "version":1
                                        }
--verify                                Verify if the reassignment completed
                                          as specified by the --reassignment-
                                          json-file option. If there is a
                                          throttle engaged for the replicas
                                          specified, and the rebalance has
                                          completed, the throttle will be
                                          removed
--version                               Display Kafka version.
Options (20)
OptionDescriptionSource
--additionalExecute this reassignment in addition to any other ongoing ones.help
--bootstrap-controller String:The controller to use for bootstrap controller to connect to] reassignment.help
--bootstrap-server String:the server(s) to use for bootstrapping.help
--broker-list String:The list of brokers to which the partitions need to be reassigned in the form "0,1,2".help
--cancelCancel an active reassignment.help
--command-config String:Property file containing configs to be property file> passed to Admin Client.help
--disable-rack-awareDisable rack aware replica assignmenthelp
--disallow-replication-factor-changeDenies the ability to change a partition's replication factor as part of this reassignment through adding validation against it.help
--executeKick off the reassignment as specified by the --reassignment-json-file option.help
--generateGenerate a candidate partition reassignment configuration.help
--helpPrint usage information.help
--listList all active partition reassignments.help
--preserve-throttlesDo not modify broker or topic throttles.help
--reassignment-json-file String:The JSON file with the partition manual assignment json file path> reassignment configurationThe format to use is - {"partitions": [{"topic": "foo", "partition": 1, "replicas": [1,2,3], "log_dirs":…help
--replica-alter-log-dirs-throttleThe movement of replicas between log <Long: replicaAlterLogDirsThrottle> directories on the same broker will be throttled to this value (bytes/sec).help
--throttle Long:The movement of partitions between brokers will be throttled to this value (bytes/sec).help
--timeout Long:The maximum time in ms to wait for log directory replica assignment to begin.help
--topics-to-move-json-file String:Generate a reassignment configuration topics to reassign json file path> to move the partitions of the specified topics to the list of brokers specified by the --broker- list option.help
--verifyVerify if the reassignment completed as specified by the --reassignment- json-file option.help
--versionDisplay Kafka version.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.