Hi,
Yes I get that when I am using the apis provided by kstream I can basically
use both:
-  Tumbling time window (non-overlapping, gap-less windows)
-  Hopping time window (Time-based Fixed-size, overlapping windows)

I wanted to know if I am using state store directly when created using a
RocksDbWindowBytesStoreSupplier.
In that case the RocksDBWindowStore created will always be of type Tumbling.
ie any record put into that store will be part of one window only.

Thanks
Sachin






On Thu, Feb 27, 2020 at 1:09 PM Matthias J. Sax <mj...@apache.org> wrote:

> What you call "sliding window" is called "hopping window" in Kafka Streams.
>
> And yes, you can use a windowed-store for this case: In fact, a
> non-overlapping tumbling window is just a special case of a hopping
> window with advance == window-size.
>
> In Kafka Streams we have a single implementation for hopping windows
> (that we use for tumbling windows, too):
>
> https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamWindowAggregate.java
>
>
> -Matthias
>
> On 2/26/20 9:47 PM, Sachin Mittal wrote:
> > Hi,
> > So far how I have understood is that when we create a rocksdb window
> store;
> > we specify a window size and retention period.
> >
> > So windows are created from epoch time based on size, say size if 100
> then
> > windows are:
> > [0, 100), [100, 200), [200, 300) ...
> >
> > Windows are retained based on retention period and after which it is
> > dropped.
> >
> > Also a window is divided into segments which is implemented using a
> treemap.
> >
> > Please confirm if my understanding is correct.
> >
> > Also looks from all this is that windows are always hopping.
> >
> > Is there a case of sliding windows that can be created? If yes how?
> > Example of sliding window would be:
> > [0, 100), [75, 175), [150, 250) ...
> >
> > Thanks
> > Sachin
> >
>
>

Reply via email to