private static Entry<Map<TopicPartitionReplica, LogDirMoveState>, Boolean> verifyReplicaMoves(Admin adminClient,
                                                                                                   Map<TopicPartitionReplica, String> targetReassignments
    ) throws ExecutionException, InterruptedException {
        Map<TopicPartitionReplica, LogDirMoveState> moveStates = findLogDirMoveStates(adminClient, targetReassignments);
        System.out.println(replicaMoveStatesToString(moveStates));
        return new SimpleImmutableEntry<>(moveStates, !moveStates.values().stream().allMatch(LogDirMoveState::done));
    }
Verify the replica reassignments specified by the user.

@param adminClient           The AdminClient to use.
@param targetReassignments   The replica reassignments specified by the user.

@return                      A tuple of the replica states, and a boolean which is true
                             if there are any ongoing replica moves.

                             Note: Unlike in verifyPartitionAssignments, we will
                             return false here even if there are unrelated ongoing
                             reassignments. (We don't have an efficient API that
                             returns all ongoing replica reassignments.)
tools/src/main/java/org/apache/kafka/tools/reassign/ReassignPartitionsCommand.java