Bird
0
0

What will be the output of the command kafka-topics.sh --describe --topic test-topic --bootstrap-server localhost:9092 if the topic has 2 partitions and replication factor 1?

medium📝 Predict Output Q4 of 15
Kafka - Basics and Event Streaming
What will be the output of the command kafka-topics.sh --describe --topic test-topic --bootstrap-server localhost:9092 if the topic has 2 partitions and replication factor 1?
AList of all topics in the cluster
BDetails of each partition including leader, replicas, and ISR
CError: Topic not found
DStarts a console consumer for the topic
Step-by-Step Solution
Solution:
  1. Step 1: Understand the --describe option

    The --describe option shows detailed info about partitions, leaders, replicas, and ISR for the topic.
  2. Step 2: Analyze the command context

    Since the topic exists with 2 partitions and replication factor 1, the command outputs partition details.
  3. Final Answer:

    Details of each partition including leader, replicas, and ISR -> Option B
  4. Quick Check:

    Describe topic = partition details [OK]
Quick Trick: Use --describe to get partition and replica info [OK]
Common Mistakes:
  • Expecting a list of all topics instead
  • Assuming it starts a consumer
  • Thinking it errors if topic exists

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes