Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-8670

kafka-topics.sh shows IllegalArgumentException when describing all topics if no topics exist on the cluster

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0, 2.3.0, 2.2.1
    • Fix Version/s: 2.4.0, 2.3.1
    • Component/s: admin, tools
    • Labels:
      None

      Description

      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.

      ./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$)
      

       
      If no --topic option is passed to the command, and there are no topics on the cluster, the command should not fail, rather have empty output.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              wyuka Tirtha Chatterjee
              Reporter:
              wyuka Tirtha Chatterjee

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment