kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evan Chan ...@ooyala.com>
Subject Re: Timestamps
Date Wed, 07 Dec 2011 17:59:11 GMT
Is there a setting that controls the log segment size?

Better yet, is there a way to tell the broker (maybe from the consumer),
look I want you to start a new log segment?

thx,
Evan


On Wed, Dec 7, 2011 at 8:09 AM, Neha Narkhede <neha.narkhede@gmail.com>wrote:

> Mark,
>
> The SimpleConsumer class has an API for this - getOffsetsBefore(topic,
> partition, time, maxNumOffsets).
> Using this API, you can get the offset "closest" to a particular timestamp
> at the log segment granularity. By
> log segment granularity, I mean that it doesn't poke inside a log segment
> and find the message right before or
> right after the timestamp you want.
>
> Thus, it is just an approximation. The larger your log segment, the less
> accuracy you will get using this API.
>
> Thanks,
> Neha
>
> On Wed, Dec 7, 2011 at 7:54 AM, Mark <static.void.dev@gmail.com> wrote:
>
> > Is there any way to consume all messages starting at and/or between two
> > timestamps?
> >
>



-- 
--
*Evan Chan*
Senior Software Engineer |
ev@ooyala.com | (650) 996-4600
www.ooyala.com | blog <http://www.ooyala.com/blog> |
@ooyala<http://www.twitter.com/ooyala>

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