You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "prasanthi (JIRA)" <ji...@apache.org> on 2019/02/02 22:16:00 UTC
[jira] [Created] (KAFKA-7895) Ktable supress operator emitting more
than one record for the same key per window
prasanthi created KAFKA-7895:
--------------------------------
Summary: Ktable supress operator emitting more than one record for the same key per window
Key: KAFKA-7895
URL: https://issues.apache.org/jira/browse/KAFKA-7895
Project: Kafka
Issue Type: Bug
Components: streams
Reporter: prasanthi
Hi, We are using kstreams to get the aggregated counts per vendor(key) within a specified window.
Here's how we configured the suppressĀ operator to emit one final record per key/window.
{code:java}
KTable<Windowed<Integer>, Long> windowedCount = groupedStream
.windowedBy(TimeWindows.of(Duration.ofMinutes(1)).grace(ofMillis(5L)))
.count(Materialized.with(Serdes.Integer(),Serdes.Long()))
.suppress(Suppressed.untilWindowCloses(unbounded()));
{code}
But we are getting more than one record for the same key/window as shown below.
{code:java}
[KTABLE-TOSTREAM-0000000010]: [131@1549067040000/1549067100000], 1039
[KTABLE-TOSTREAM-0000000010]: [131@1549067040000/1549067100000], 1162
[KTABLE-TOSTREAM-0000000010]: [9@1549067040000/1549067100000], 6584
[KTABLE-TOSTREAM-0000000010]: [88@1549067040000/1549067100000], 107
[KTABLE-TOSTREAM-0000000010]: [108@1549067040000/1549067100000], 315
[KTABLE-TOSTREAM-0000000010]: [119@1549067040000/1549067100000], 119
[KTABLE-TOSTREAM-0000000010]: [154@1549067040000/1549067100000], 746
[KTABLE-TOSTREAM-0000000010]: [154@1549067040000/1549067100000], 809{code}
Could you please take a look?
Thanks
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)