[
https://issues.apache.org/jira/browse/KAFKA-8670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16885474#comment-16885474
]
Tirtha Chatterjee commented on KAFKA-8670:
------------------------------------------
This issue is distinct from https://issues.apache.org/jira/browse/KAFKA-8053
which is about Kafka's error message being confusing when --describe is called
with a --topic argument, but there are no topics on the cluster.
The distinction here is that this ticket addresses the case where no --topic is
passed, while the other focuses on a better error message when --topic is
indeed passed, but there are no topics on the cluster.
> kafka-topics.sh shows IllegalArgumentException when describing all topics if
> no topics exist
> --------------------------------------------------------------------------------------------
>
> Key: KAFKA-8670
> URL: https://issues.apache.org/jira/browse/KAFKA-8670
> Project: Kafka
> Issue Type: Bug
> Components: admin, tools
> Affects Versions: 2.2.0, 2.3.0, 2.2.1
> Reporter: Tirtha Chatterjee
> Assignee: Tirtha Chatterjee
> Priority: Major
>
> When trying to describe all the kafka-topics.sh utility, a user would run
> kafka-topics.sh --describe without passing a --topic option. If there are no
> topics on the cluster, Kafka returns an error with IllegalArgumentException.
> {code:java}
> ./kafka-topics.sh --zookeeper
> 172.16.7.230:2181,172.16.17.27:2181,172.16.10.89:2181 --describe
> Error while executing topic command : Topics in [] does not exist
> [2019-07-07 03:33:15,288] ERROR java.lang.IllegalArgumentException: Topics in
> [] does not exist
> at
> kafka.admin.TopicCommand$.kafka$admin$TopicCommand$$ensureTopicExists(TopicCommand.scala:416)
> at
> kafka.admin.TopicCommand$ZookeeperTopicService.describeTopic(TopicCommand.scala:332)
> at kafka.admin.TopicCommand$.main(TopicCommand.scala:66)
> at kafka.admin.TopicCommand.main(TopicCommand.scala)
> (kafka.admin.TopicCommand$)
> {code}
>
> If no --topic option is passed to the command, it should not fail, rather
> have empty output.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)