static Set<Integer> calculateMovingBrokers(Set<TopicPartitionReplica> replicaMoves) {
        return replicaMoves.stream().map(TopicPartitionReplica::brokerId).collect(Collectors.toSet());
    }
Calculate all the brokers which are involved in the given directory movements.

@param replicaMoves  The replica movements.
@return              A set of all the brokers involved.
tools/src/main/java/org/apache/kafka/tools/reassign/ReassignPartitionsCommand.java