public static void setReplicationThrottleForPartitions(Admin admin,
                                                           List<Integer> brokerIds,
                                                           Set<TopicPartition> partitions,
                                                           int throttleBytes) throws ExecutionException, InterruptedException {
        throttleAllBrokersReplication(admin, brokerIds, throttleBytes);
        assignThrottledPartitionReplicas(admin, partitions.stream().collect(Collectors.toMap(p -> p, p -> brokerIds)));
    }
Set broker replication quotas and enable throttling for a set of partitions. This
will override any previous replication quotas, but will leave the throttling status
of other partitions unaffected.
tools/src/test/java/org/apache/kafka/tools/ToolsTestUtils.java