Re: Cannot get value from ValueState in ProcessingTimeTrigger

2019-12-18 Thread vino yang
Hi Utopia, IMO, your analysis is correct. Best, Vino Utopia 于2019年12月19日周四 上午12:44写道: > Hi Vino, > > Maybe it is due to the type of window. What I used is > ProcessingTimeSessionWindows, while keyedState is scoped to *window and > key*. Window changes so that the ValueState is different. > > B

Re: Cannot get value from ValueState in ProcessingTimeTrigger

2019-12-18 Thread Utopia
Hi Vino, Maybe it is due to the type of window. What I used is ProcessingTimeSessionWindows, while keyedState is scoped to window and key. Window changes so that the ValueState is different. Best  regards Utopia 在 2019年12月18日 +0800 22:30,Utopia ,写道: > Hi Vino, > > Thanks for your reply ! > > Th

Re: Cannot get value from ValueState in ProcessingTimeTrigger

2019-12-18 Thread Utopia
Hi Vino, Thanks for your reply ! The key of my input data is same value. So I think there is only one partition. And Why sometimes I can get the value stored in the ValueState before update? > > > > before update value : 3 > > > > after update value: 4 What’s more, How can I stored the previous

Re: Cannot get value from ValueState in ProcessingTimeTrigger

2019-12-18 Thread vino yang
Hi Utopia, The behavior may be correct. First, the default value is null. It's the correct value. `ValueStateDescriptor` has multiple constructors, some of them can let you specify a default value. However, these constructors are deprecated. And the doc does not recommend them.[1] For the other c

Cannot get value from ValueState in ProcessingTimeTrigger

2019-12-18 Thread Utopia
Hi, I want to get the last value stored in ValueState when processing element in Trigger. But as the log shows that sometimes I can get the value, sometimes not. Only one key in my data(SensorReading). ValueState: class ProcessingTimeTrigger extends Trigger[SensorReading, TimeWindow] { privat