Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Kafka >> mail # dev >> Initializing fetch offsets

David Arthur 2013-02-21, 02:32
Copy link to this message
Re: Initializing fetch offsets

The API that you are looking for is OffsetRequest. If you pass in -2 as the
value for Time, it will get you the earliest offset available for that
partition. If you pass in -1, it will get you the latest offset.

You can find more information about the OffsetRequest and OffsetResponse
APIs here -

Please let us know if that description can be improved.

On Wed, Feb 20, 2013 at 6:31 PM, David Arthur <[EMAIL PROTECTED]> wrote:

> Is there currently a way to get the latest offset (or close to the latest)
> for a partition? Is this covered by the Offset API, and if so could someone
> explain this API a bit?
> I'd like to write a consumer that can start from 0 (like unix cat) or
> start from the most recent (like unix tail).
> Thanks!
> -David

David Arthur 2013-02-21, 13:04
Colin Blower 2013-02-21, 16:54
Neha Narkhede 2013-02-21, 20:40