static String currentPartitionReplicaAssignmentToString(Map<TopicPartition, List<Integer>> proposedParts,
                                                            Map<TopicPartition, List<Integer>> currentParts) throws JsonProcessingException {
        Map<TopicPartition, List<Integer>> partitionsToBeReassigned = currentParts.entrySet().stream()
            .filter(e -> proposedParts.containsKey(e.getKey()))
            .collect(Collectors.toMap(Entry::getKey, Entry::getValue));

        return String.format("Current partition replica assignment%n%n%s%n%nSave this to use as the %s",
            formatAsReassignmentJson(partitionsToBeReassigned, Collections.emptyMap()),
            "--reassignment-json-file option during rollback");
    }
Return the string which we want to print to describe the current partition assignment.

@param proposedParts               The proposed partition assignment.
@param currentParts                The current partition assignment.

@return                            The string to print.  We will only print information about
                                   partitions that appear in the proposed partition assignment.
tools/src/main/java/org/apache/kafka/tools/reassign/ReassignPartitionsCommand.java