You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Eric Lalonde <er...@autonomic.ai> on 2017/05/31 08:50:58 UTC

WindowStore fetch() ordering

Hello, I was reading:

https://kafka.apache.org/0102/javadoc/org/apache/kafka/streams/state/ReadOnlyWindowStore.html#fetch(K,%20long,%20long) <https://kafka.apache.org/0102/javadoc/org/apache/kafka/streams/state/ReadOnlyWindowStore.html#fetch(K, long, long)>

From both my experiments and the way I read the fetch() documentation, it appears the values in the iterator are returned in increasing temporal order. Is this ordering guaranteed? e.g. if I want the the most recent value in the window range passed to fetch(), will it *always* be the last value, or are there scenarios where this is relaxed? 

I've linked above to ReadOnlyWindowStore, but the question goes for any window store iterator.


Re: WindowStore fetch() ordering

Posted by Damian Guy <da...@gmail.com>.
Hi Eric,

For any given key the data will always be returned in increasing temporal
order. So, yes, the most recent value for a key will be the last value.

Thanks,
Damian

On Wed, 31 May 2017 at 09:51 Eric Lalonde <er...@autonomic.ai> wrote:

> Hello, I was reading:
>
>
> https://kafka.apache.org/0102/javadoc/org/apache/kafka/streams/state/ReadOnlyWindowStore.html#fetch(K,%20long,%20long)
> <
> https://kafka.apache.org/0102/javadoc/org/apache/kafka/streams/state/ReadOnlyWindowStore.html#fetch(K,
> long, long)>
>
> From both my experiments and the way I read the fetch() documentation, it
> appears the values in the iterator are returned in increasing temporal
> order. Is this ordering guaranteed? e.g. if I want the the most recent
> value in the window range passed to fetch(), will it *always* be the last
> value, or are there scenarios where this is relaxed?
>
> I've linked above to ReadOnlyWindowStore, but the question goes for any
> window store iterator.
>
>