Re: Sliding Window Count: Tricky Edge Case / Count Zero Problem

2021-03-02 Thread Jan Brusch
mail.com>> *Send Date:*Tue Feb 9 02:35:20 2021 *Recipients:*Jan Brusch mailto:jan.bru...@neuland-bfi.de>> *CC:*Yun Gao mailto:yungao...@aliyun.com>>, user mailto:user@flink.apache.org>> *Subject:*R

Re: Sliding Window Count: Tricky Edge Case / Count Zero Problem

2021-03-02 Thread Roman Khachatryan
For flink the state and timer are all bound to a key implicitly, thus >> I think they should >> not need to be bound manually. >> 2. To clear the outdated state, it could be cleared via count.clear(); if >> it has been 0 >> for a long time. There are different ways to coun

Re: Sliding Window Count: Tricky Edge Case / Count Zero Problem

2021-02-26 Thread Jan Brusch
ser mailto:user@flink.apache.org>> *Subject:*Re: Sliding Window Count: Tricky Edge Case / Count Zero Problem Hi, Probably another solution would be to register a timer (using KeyedProcessFunction) once we see an element after

Re: Re: Sliding Window Count: Tricky Edge Case / Count Zero Problem

2021-02-08 Thread Arvid Heise
mer when received the elements or update the counter to > -1, -2... to mark > how much timer it has passed. > > > Best, > Yun > > > > > --Original Mail ---------- > *Sender:*Khachatryan Roman > *Send Date:*Tue Feb 9 02:35:20 2021 > *R

Re: Re: Sliding Window Count: Tricky Edge Case / Count Zero Problem

2021-02-08 Thread Yun Gao
update the counter to -1, -2... to mark how much timer it has passed. Best, Yun --Original Mail -- Sender:Khachatryan Roman Send Date:Tue Feb 9 02:35:20 2021 Recipients:Jan Brusch CC:Yun Gao , user Subject:Re: Sliding Window Count: Tricky Edge Case / Coun

Re: Sliding Window Count: Tricky Edge Case / Count Zero Problem

2021-02-08 Thread Khachatryan Roman
gt; > [1] > https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/operators/process_function.html#the-keyedprocessfunction > > ------Original Mail -- > *Sender:*Jan Brusch > > *Send Date:*Sat Feb 6 23:44:00 2021 > *Recipients:*user > *Su

Re: Sliding Window Count: Tricky Edge Case / Count Zero Problem

2021-02-08 Thread Jan Brusch
projects/flink/flink-docs-stable/dev/stream/operators/process_function.html#the-keyedprocessfunction --Original Mail -- *Sender:*Jan Brusch *Send Date:*Sat Feb 6 23:44:00 2021 *Recipients:*user *Subject:*Sliding Window Count: Tricky Edge Case

Re: Sliding Window Count: Tricky Edge Case / Count Zero Problem

2021-02-07 Thread Yun Gao
Hi Jan, From my view, I think in Flink Window should be as a "high-level" operation for some kind of aggregation operation and if it could not satisfy the requirements, we could at least turn to using the "low-level" api by using KeyedProcessFunction[1]. In this case, we could use a ValueState

Sliding Window Count: Tricky Edge Case / Count Zero Problem

2021-02-06 Thread Jan Brusch
Hi, I was recently working on a problem where we wanted to implement a simple count on a sliding window, e.g. "how many messages of a certain type were emitted by a certain type of sensor in the last n minutes". Which sounds simple enough in theory: messageStream     .keyBy(//EmitterType +