static void modifyTopicThrottles(Admin adminClient,
                                     Map<String, String> leaderThrottles,
                                     Map<String, String> followerThrottles) throws ExecutionException, InterruptedException {
        Map<ConfigResource, Collection<AlterConfigOp>> configs = new HashMap<>();
        Set<String> topicNames = new HashSet<>(leaderThrottles.keySet());
        topicNames.addAll(followerThrottles.keySet());
        topicNames.forEach(topicName -> {
            List<AlterConfigOp> ops = new ArrayList<>();
            if (leaderThrottles.containsKey(topicName)) {
                ops.add(new AlterConfigOp(new ConfigEntry(QuotaConfigs.LEADER_REPLICATION_THROTTLED_REPLICAS_CONFIG, leaderThrottles.get(topicName)), AlterConfigOp.OpType.SET));
            }
            if (followerThrottles.containsKey(topicName)) {
                ops.add(new AlterConfigOp(new ConfigEntry(QuotaConfigs.FOLLOWER_REPLICATION_THROTTLED_REPLICAS_CONFIG, followerThrottles.get(topicName)), AlterConfigOp.OpType.SET));
            }
            if (!ops.isEmpty()) {
                configs.put(new ConfigResource(ConfigResource.Type.TOPIC, topicName), ops);
            }
        });
        adminClient.incrementalAlterConfigs(configs).all().get();
    }
Modify the topic configurations that control inter-broker throttling.

@param adminClient         The adminClient object to use.
@param leaderThrottles     A map from topic names to leader throttle configurations.
@param followerThrottles   A map from topic names to follower throttle configurations.
tools/src/main/java/org/apache/kafka/tools/reassign/ReassignPartitionsCommand.java