private static void decodePartitionsByHost(final AssignmentInfo assignmentInfo,
                                               final DataInputStream in) throws IOException {
        assignmentInfo.partitionsByHost = new HashMap<>();
        final int numEntries = in.readInt();
        for (int i = 0; i < numEntries; i++) {
            final HostInfo hostInfo = new HostInfo(in.readUTF(), in.readInt());
            assignmentInfo.partitionsByHost.put(hostInfo, readTopicPartitions(in));
        }
    }
@throws TaskAssignmentException if method fails to decode the data or if the data version is unknown
streams/src/main/java/org/apache/kafka/streams/processor/internals/assignment/AssignmentInfo.java