Re: 答复: Invoking KafkaConsumer#seek for the same partition

2017-04-13 Thread Michal Borowiecki

But I totally agree, the comment is ambiguous.

The way it's phrased now "latest offset" can easily be taken for "the 
highest(=latest) of the offsets" rather than "the offset last-used".


Cheers,

Michal


On 13/04/17 10:07, Hu Xi wrote:

Oh My! yes, you are right. I would have been thinking it that way  Thank 
you.


发件人: Michal Borowiecki <michal.borowie...@openbet.com>
发送时间: 2017年4月13日 17:02
收件人: dev@kafka.apache.org
主题: Re: Invoking KafkaConsumer#seek for the same partition

Sounds to me the comment is imprecisely phrased but was meant to
indicate the behaviour you are describing.

Perhaps instead of "the latest offset", it should say, "the offset used
in the latest seek" to make it super-clear.

Cheers,

Michal


On 13/04/17 08:28, Hu Xi wrote:

Hi guys,


The comments for KafkaConsumer#seek says “If this API is invoked for the same 
partition more than once, the latest offset will be used on the next poll()”. 
However, I tried a couple of times, and it turned out that the next poll could 
always read records from the offset which was specified in the last call of 
KafkaConsumer#seek instead of the latest offset. Seems the comment is not 
correct.  What do you say? Any comments are welcomed.







答复: Invoking KafkaConsumer#seek for the same partition

2017-04-13 Thread Hu Xi
Oh My! yes, you are right. I would have been thinking it that way  Thank 
you.


发件人: Michal Borowiecki <michal.borowie...@openbet.com>
发送时间: 2017年4月13日 17:02
收件人: dev@kafka.apache.org
主题: Re: Invoking KafkaConsumer#seek for the same partition

Sounds to me the comment is imprecisely phrased but was meant to
indicate the behaviour you are describing.

Perhaps instead of "the latest offset", it should say, "the offset used
in the latest seek" to make it super-clear.

Cheers,

Michal


On 13/04/17 08:28, Hu Xi wrote:
> Hi guys,
>
>
> The comments for KafkaConsumer#seek says “If this API is invoked for the same 
> partition more than once, the latest offset will be used on the next poll()”. 
> However, I tried a couple of times, and it turned out that the next poll 
> could always read records from the offset which was specified in the last 
> call of KafkaConsumer#seek instead of the latest offset. Seems the comment is 
> not correct.  What do you say? Any comments are welcomed.




Re: Invoking KafkaConsumer#seek for the same partition

2017-04-13 Thread Michal Borowiecki
Sounds to me the comment is imprecisely phrased but was meant to 
indicate the behaviour you are describing.


Perhaps instead of "the latest offset", it should say, "the offset used 
in the latest seek" to make it super-clear.


Cheers,

Michal


On 13/04/17 08:28, Hu Xi wrote:

Hi guys,


The comments for KafkaConsumer#seek says “If this API is invoked for the same 
partition more than once, the latest offset will be used on the next poll()”. 
However, I tried a couple of times, and it turned out that the next poll could 
always read records from the offset which was specified in the last call of 
KafkaConsumer#seek instead of the latest offset. Seems the comment is not 
correct.  What do you say? Any comments are welcomed.





Invoking KafkaConsumer#seek for the same partition

2017-04-13 Thread Hu Xi
Hi guys,


The comments for KafkaConsumer#seek says “If this API is invoked for the same 
partition more than once, the latest offset will be used on the next poll()”. 
However, I tried a couple of times, and it turned out that the next poll could 
always read records from the offset which was specified in the last call of 
KafkaConsumer#seek instead of the latest offset. Seems the comment is not 
correct.  What do you say? Any comments are welcomed.