public List<PartitionInfo> partitionsForTopic(String topic) {
        return partitionsByTopic.getOrDefault(topic, Collections.emptyList());
    }
Get the list of partitions for this topic
@param topic The topic name
@return A list of partitions
clients/src/main/java/org/apache/kafka/common/Cluster.java