THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
/** * <p>Assign the partitions given as the key of the given <code>assignments</code> to the corresponding * list of brokers. This can be used to change the replica assignment or change the topic's replication factor. * The first broker in each list is the one which holds the "preferred replica".</p> * * <p>To change the replication factor for a topic there must be a key for each partition in * the {@code assignment}s map and the corresponding list of brokers must each be of the same * length which will become the new replication factor.</p> * * <p>If only a subset of the partitions of a particular topic are present in {@code assignments} * the change is taken to be a reassignment of replicas to brokers and each list must have * the same length as the current topic replication factor.</p> * * <h3>Throttling</h3> * <p>Inter-broker reassignment and/or increasing the replication factor causes significant * inter-broker traffic and can take a long time * in order to copy the replica data to brokers. It may be necessary to impose a quotathrottle on * inter-broker traffic for the duration of the reassignment so that client-broker traffic is not * adversely affected.</p> * * <h3>Preferred replica</h3> * <p>When brokers are configured with <code>auto.leader.rebalance.enable=true</code>, the broker * with the preferred replica will be elected leader automatically. * <code>kafka-preferred-replica-election.sh</code> provides a manual trigger for this * election when <code>auto.leader.rebalance.enable=false</code>.</p> */ public ReassignPartitionsResult reassignPartitions(Map<TopicPartition, List<Integer>> assignments) public ReassignPartitionsResult reassignPartitions(Map<TopicPartition, List<Integer>> assignments, ReassignPartitionsOptions options) |
...