CCDAK · Question #8
How will you find out all the partitions where one or more of the replicas for the partition are not in- sync with the leader?
The correct answer is D. kafka-topics.sh --zookeeper localhost:2181 --describe --under-replicated-partitions. Option D is correct because --under-replicated-partitions is the precise flag that lists partitions where one or more replicas are lagging behind the leader, and --zookeeper localhost:2181 was the standard connection method for the Kafka version this exam targets. Why the…
Question
How will you find out all the partitions where one or more of the replicas for the partition are not in- sync with the leader?
Options
- Akafka-topics.sh --bootstrap-server localhost:9092 --describe --unavailable- partitions
- Bkafka-topics.sh --zookeeper localhost:2181 --describe --unavailable- partitions
- Ckafka-topics.sh --broker-list localhost:9092 --describe --under-replicated-partitions
- Dkafka-topics.sh --zookeeper localhost:2181 --describe --under-replicated-partitions
How the community answered
(52 responses)- A4% (2)
- B2% (1)
- C8% (4)
- D87% (45)
Explanation
Option D is correct because --under-replicated-partitions is the precise flag that lists partitions where one or more replicas are lagging behind the leader, and --zookeeper localhost:2181 was the standard connection method for the Kafka version this exam targets.
Why the distractors are wrong:
- A & B use
--unavailable-partitions, which finds partitions with no leader at all (completely offline) - a different problem from replicas simply being out of sync with an active leader. - C uses
--broker-list, which is not a valid flag forkafka-topics.sh(that flag belongs to tools likekafka-console-producer.sh); the correct connection flags are--zookeeperor--bootstrap-server. - A also pairs
--bootstrap-serverwith the wrong flag, making it doubly wrong.
Memory tip: Think "under-replicated = replicas falling behind" vs "unavailable = no leader exists" - these are two distinct failure states. For older Kafka exam questions, Zookeeper (2181) connects the admin tools, while brokers (9092) handle client data.
Topics
Community Discussion
No community discussion yet for this question.