Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This tool lists the information for a given list of topics. If no topics are provided in the command line, the tool queries zookeeper to get all the topics and lists the information for them. The fields that the tool displays are - topic name, partition, leader, replicas, isr. Two optional arguments can be provided to the tool.
If "under-replicated-partitions" is specified, the tool only provides information for those topic / partitions which have replicas that are under replicated. If "unavailable-partitions" is specified, the tool only provides information for those topic/partitions whose leader is not available.

How to use the tool?

Code Block

List info for topic1
bin/kafka-list-topic.sh --zookeeper localhost:2121 --topic topic1

List info for all topics
bin/kafka-list-topic.sh --zookeeper localhost:2121 

List info for topics which have under replicated count
bin/kafka-list-topic.sh --zookeeper localhost:2121 --under-replicated-partitions

List info for topics whose leader for a partition is not available
bin/kafka-list-topic.sh --zookeeper localhost:2121 --unavailable-partitions