dengziming commented on a change in pull request #9769:
URL: https://github.com/apache/kafka/pull/9769#discussion_r564979586



##########
File path: core/src/main/scala/kafka/admin/TopicCommand.scala
##########
@@ -313,42 +314,59 @@ object TopicCommand extends Logging {
     }
 
     override def describeTopic(opts: TopicCommandOptions): Unit = {
-      val topics = getTopics(opts.topic, opts.excludeInternalTopics)
-      ensureTopicExists(topics, opts.topic, !opts.ifExists)
+      // if topicId is provided and not zero, will use topicId regardless of 
topic name
+      val useTopicId = opts.topicId.map(Uuid.fromString).nonEmpty

Review comment:
       Thank you, I was careless about this case, I add the following fix:
   1. When --topic and --topic-id are both specified, I will print a warning 
message that saying that "topicId will be used if both are specified and 
topicId is not zero"
   2. Filter ZERO UUID before handling in TopicCommand.




----------------------------------------------------------------
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


Reply via email to