kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikael Högqvist <hoegqv...@gmail.com>
Subject KTable#through from window store to key value store
Date Fri, 16 Dec 2016 10:45:24 GMT
Hi,

I have a small example topology that count words per minute (scala):

    words
      .map { (key, word) =>
        new KeyValue(word, Long.box(1L))
      }
      .groupByKey(Serdes.String, Serdes.Long)
      .count(TimeWindows.of(5 * 60 * 1000L), tableOne)
      .through(new WindowedSerde, Serdes.Long, s"$appId-count-topic",
tableTwo)

The first table, tableOne, is a WindowStore and can be accessed using fetch
on the key and time range. After using .through to forward the data to
another topic and table, tableTwo becomes a KeyValueStore. Is it possible
to keep tableTwo as a WindowStore also?

Best,
Mikael

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