Bird
0
0

You run the command:

medium📝 Debug Q6 of 15
Kafka - Topics and Partitions
You run the command:
kafka-topics.sh --create --topic data --partitions two --replication-factor 1

What is the issue with this command?
AReplication factor cannot be 1
BThe partitions value must be an integer, 'two' is invalid
CTopic name 'data' is invalid
DCommand is correct and will create the topic
Step-by-Step Solution
Solution:
  1. Step 1: Check partitions argument type

    The partitions flag requires an integer number, but 'two' is a string.
  2. Step 2: Identify error cause

    Using a non-integer for partitions causes a syntax or runtime error in the command.
  3. Final Answer:

    The partitions value must be an integer, 'two' is invalid -> Option B
  4. Quick Check:

    Partitions must be integer [OK]
Quick Trick: Partitions must be a number, not words [OK]
Common Mistakes:
  • Using words instead of numbers
  • Assuming replication factor 1 is invalid
  • Thinking topic name 'data' is invalid

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes