kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlo Cabanilla <ca...@datadoghq.com>
Subject Confused about offsets
Date Fri, 19 Aug 2011 22:30:36 GMT
 Hello, 

I'm trying to wrap my head around how requesting offsets works.

If I run this:

$ kafka-producer-shell.sh --server kafka://localhost:9092 --topic test
yo
sent: yo (11 bytes)
sup
sent: sup (12 bytes)


I'd expect to have 3 offsets: 0, 11 and 23. Instead, I have only two: 

$ kafka-run-class.sh kafka.tools.GetOffsetShell --server kafka://localhost:9092 --topic test
--time -1 --offsets 3
get 2 results
23
0


Why is this the case?

Also, querying by timestamp does not seem to be working:

$ kafka-run-class.sh kafka.tools.GetOffsetShell --server kafka://localhost:9092 --topic test
--time $(date +%s) --offsets 3
get 0 results


This is from the 0.6 release.

.Carlo




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message