You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by John Dennison <de...@gmail.com> on 2016/02/11 04:07:12 UTC
Compacted topic earliest offset request
Greetings,
I have a question regarding the earliest offset request for compacted
topic. I wanted to confirm what the expected behavior is. I am using Kafka
0.8.2.
I have a topic where the compaction thread has run.
When I request the earliest offset like so:
bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list
kafka01:9092 --topic compactedtopic --time -2
compactedtopic:0:0
compactedtopic:1:0
It reports earliest offset (-2) as 0
When i grab from the earliest (using kafkcat)
kafkacat -b kafka01 -C -t compactedtopic -p 0 -f 'Topic[%p], offset: %o,
key: %k\n' -c 3
Topic[0], offset: 151866, key: key1
Topic[0], offset: 151867, key: key2
Topic[0], offset: 151869, key: key3
The first offset is 151866. Is this correct behavior?
Thanks,
John