Which command shows partitions without a leader for a topic?

Study for the CCDAK Apache Kafka Test. Prepare with optimized flashcards and diverse questions, enhanced with hints and detailed explanations. Equip yourself for success!

Multiple Choice

Which command shows partitions without a leader for a topic?

Explanation:
You’re being tested on how to identify partitions that currently have no leader. In Kafka, every partition normally has a leader broker that handles all reads and writes for that partition. If that leader broker goes down or is in the middle of a leader election, the partition temporarily has no leader and is considered unavailable. The kafka-topics.sh tool can surface this state when you describe a topic and request the partitions that are unavailable. The flag to include those partitions is --unavailable-partitions. To get this information, you connect to the cluster state (in this setup via Zookeeper) and run the command with --zookeeper, along with --describe and --unavailable-partitions. This combination will list partitions that currently lack a leader. Using bootstrap-server mode can behave differently for this particular flag in some environments, so the Zookeeper-based approach gives the reliable output for showing partitions without a leader.

You’re being tested on how to identify partitions that currently have no leader. In Kafka, every partition normally has a leader broker that handles all reads and writes for that partition. If that leader broker goes down or is in the middle of a leader election, the partition temporarily has no leader and is considered unavailable. The kafka-topics.sh tool can surface this state when you describe a topic and request the partitions that are unavailable. The flag to include those partitions is --unavailable-partitions. To get this information, you connect to the cluster state (in this setup via Zookeeper) and run the command with --zookeeper, along with --describe and --unavailable-partitions. This combination will list partitions that currently lack a leader. Using bootstrap-server mode can behave differently for this particular flag in some environments, so the Zookeeper-based approach gives the reliable output for showing partitions without a leader.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy