Re: Question regarding state cleaning using timer

2018-09-17 Thread Vijay Bhaskar
Thanks Kostas! Regards Bhaskar On Mon, Sep 17, 2018 at 9:05 PM Kostas Kloudas wrote: > Hi Bhaskar, > > If you want different TTLs per key, then you should use timers with a > process function > as shown in [1]. This is though an old presentation, so now the > RichProcessFunction is a KeyedProce

Re: Question regarding state cleaning using timer

2018-09-17 Thread Kostas Kloudas
Hi Bhaskar, If you want different TTLs per key, then you should use timers with a process function as shown in [1]. This is though an old presentation, so now the RichProcessFunction is a KeyedProcessFunction. Also please have a look at the training material in [2] and the process function doc

Re: Question regarding state cleaning using timer

2018-09-16 Thread Vijay Bhaskar
Thanks Hequn. But i want to give random TTL for each partitioned key. How can i achieve it? Regards Bhaskar On Mon, Sep 17, 2018 at 7:30 AM Hequn Cheng wrote: > Hi bhaskar, > > You need change nothing if you want to handle multi keys. Flink will do it > for you. The ValueState is a keyed state.

Re: Question regarding state cleaning using timer

2018-09-16 Thread Hequn Cheng
Hi bhaskar, You need change nothing if you want to handle multi keys. Flink will do it for you. The ValueState is a keyed state. You can think of Keyed State as Operator State that has be

Question regarding state cleaning using timer

2018-09-14 Thread bhaskar . ebay77
Hi In the following example given in flink: object ExampleCountWindowAverage extends App { val env = StreamExecutionEnvironment.getExecutionEnvironment env.fromCollection(List( (1L, 3L), (1L, 5L), (1L, 7L), (1L, 4L), (1L, 2L) )).keyBy(_._1) .flatMap(new CountWindowAve