Bird
0
0

Which of the following is the correct syntax to set the log segment size to 1 GB in Kafka's server.properties file?

easy📝 Syntax Q12 of 15
Kafka - Performance Tuning
Which of the following is the correct syntax to set the log segment size to 1 GB in Kafka's server.properties file?
Alog.segment.bytes=1GB
Blog.segment.size=1GB
Csegment.log.bytes=1024
Dlog.segment.bytes=1073741824
Step-by-Step Solution
Solution:
  1. Step 1: Understand Kafka's configuration syntax for sizes

    Kafka expects byte values as integers for size settings, so 1 GB must be expressed in bytes (1 GB = 1073741824 bytes).
  2. Step 2: Evaluate each option's correctness

    log.segment.bytes=1073741824 uses the correct key log.segment.bytes and the correct byte value. log.segment.size=1GB uses an invalid key and unit. segment.log.bytes=1024 uses wrong key and too small value. log.segment.bytes=1GB uses correct key but invalid unit '1GB'.
  3. Final Answer:

    log.segment.bytes=1073741824 -> Option D
  4. Quick Check:

    Size in bytes = 1073741824 [OK]
Quick Trick: Use bytes as integer for size settings, no units like GB [OK]
Common Mistakes:
  • Using units like GB instead of bytes
  • Incorrect property names
  • Using too small or wrong numeric values

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes