public BuiltInPartitioner getBuiltInPartitioner(String topic) {
        return topicInfoMap.get(topic).builtInPartitioner;
    }
Drain all the data for the given nodes and collate them into a list of batches that will fit
within the specified size on a per-node basis. This method attempts to avoid choosing the same
topic-node over and over.

@param metadataSnapshot  The current cluster metadata
@param nodes             The list of node to drain
@param maxSize           The maximum number of bytes to drain
@param now               The current unix time in milliseconds
@return A list of {@link ProducerBatch} for each node specified with total size less than the
requested maxSize.
clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java