nerdexam
Confluent

CCAAK · Question #62

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…

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…

Troubleshooting

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.

How the community answered

(50 responses)
  • A
    76% (38)
  • B
    4% (2)
  • C
    14% (7)
  • D
    6% (3)

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.

Topics

#partition leader -1#broker failure#under-replicated partitions#kafka-topics describe

Community Discussion

No community discussion yet for this question.

Full CCAAK Practice