Re: TimeWindow Trigger which only fires when the values have changed

2016-10-04 Thread Kostas Kloudas
Hi Dominik, To only fire when new elements have arrived, you should modify your EventTimeTriggerWithEarlyAndLateFiring to detect that more elements have arrived since the last firing. To do so, you should add some extra of state, e.g. ValueStateDescriptor, that you set to true in the onElement(

Re: TimeWindow Trigger which only fires when the values have changed

2016-10-04 Thread Till Rohrmann
Hi Dominik, you could extend the EventTimeTriggerWithEarlyAndLateFiring trigger to store for each key whether you’ve seen a new element since the last firing or not. When firing you can set the state back to alreadyFired. For that you can use the TriggerContext.getPartitionedState. The community

TimeWindow Trigger which only fires when the values have changed

2016-10-04 Thread Dominik Bruhn
Hi, I'm heavily relying on TimeWindows for my real time processing. Roughly my job consumes from an AMQP queue, computes some time buckets and saves the time-buckets to Cassandra. I found the EventTimeTriggerWithEarlyAndLateFiring [1] class which already helped me a lot: Even with long time-w