dengziming commented on a change in pull request #9622: URL: https://github.com/apache/kafka/pull/9622#discussion_r528699411
########## File path: clients/src/main/java/org/apache/kafka/common/Cluster.java ########## @@ -327,6 +350,18 @@ public Node controller() { return controller; } + public Collection<Uuid> topicIds() { + return topicIds.values(); + } + + public Uuid getTopicId(String topic) { + return topicIds.getOrDefault(topic, Uuid.ZERO_UUID); + } + + public String getTopicName(Uuid topiId) { Review comment: Here, I try to use getOrDefault but don't know what the default value is(it seems that "" is not a good default topicName). so just return null and let the caller decide, suggestions are welcomed if you have good ideas. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org