static void modifyLogDirThrottle(Admin admin,
                                     Set<Integer> movingBrokers,
                                     long logDirThrottle) throws ExecutionException, InterruptedException {
        if (logDirThrottle >= 0) {
            Map<ConfigResource, Collection<AlterConfigOp>> configs = new HashMap<>();
            movingBrokers.forEach(brokerId -> {
                List<AlterConfigOp> ops = new ArrayList<>();
                ops.add(new AlterConfigOp(new ConfigEntry(QuotaConfigs.REPLICA_ALTER_LOG_DIRS_IO_MAX_BYTES_PER_SECOND_CONFIG, Long.toString(logDirThrottle)), AlterConfigOp.OpType.SET));
                configs.put(new ConfigResource(ConfigResource.Type.BROKER, Long.toString(brokerId)), ops);
            });
            admin.incrementalAlterConfigs(configs).all().get();
            System.out.println("The replica-alter-dir throttle limit was set to " + logDirThrottle + " B/s");
        }
    }
Modify the log dir reassignment throttle for a set of brokers.

@param admin The Admin instance to use
@param movingBrokers The set of broker to alter the throttle of
@param logDirThrottle The new throttle (ignored if less than 0)
tools/src/main/java/org/apache/kafka/tools/reassign/ReassignPartitionsCommand.java