nerdexam
Confluent

CCAAK · Question #62

CCAAK Question #62: Real Exam Question with Answer & Explanation

The correct answer is A. Broker 1 failed.. A Leader of -1 indicates that no broker is currently the leader for that partition. This usually happens when the only replica for that partition is unavailable, often due to the associated broker (in this case, Broker 1) failing or being offline. Kafka cannot elect a leader if n

Question

You have a Kafka cluster with topics t1 and t2. In the output below, topic t2 shows Partition 1 with a leader "-1". What is the most likely reason for this? ... $ kafka-topics --zookeeper localhost:2181 --describe --topic t1 Topic:t1 PartitionCount 1 ReplicationFactor 1 Configs: Topic: t1 Partition: 0 Leader: 0 Replicas: 0 Isr: 0 $ kafka-topics --zookeeper localhost:2181 --describe --topic t2 Topic:t2 PartitionCount 2 ReplicationFactor 1 Configs: Topic: t2 Partition: 0 Leader: 0 Replicas: 0 Isr: 0 Topic: t2 Partition: 1 Leader: -1 Replicas: 1 Isr:

Options

  • ABroker 1 failed.
  • BLeader shows "-1" while the log cleaner thread runs on Broker 1.
  • CCompression has been enabled on Broker 1.
  • DBroker 1 has another partition clashing with the same name.

Explanation

A Leader of -1 indicates that no broker is currently the leader for that partition. This usually happens when the only replica for that partition is unavailable, often due to the associated broker (in this case, Broker 1) failing or being offline. Kafka cannot elect a leader if no replica is in the in- sync replica (ISR) list, which leads to leader = -1.

Community Discussion

No community discussion yet for this question.

Full CCAAK Practice