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