Sorry to make the previous mail private.
My response reposted here:
"
After a little inspection, I found that elements (window state) are stored
in namespace TimeWindow{start=1,end=11}, in your case, and trigger count
(trigger state) is stored in namespace TimeWindow{start=1,end=15}, but
WindowReaderOperator only tries to find keys and namespaces related to
window state.
"

Juntao Hu <maybach...@gmail.com> 于2022年5月12日周四 11:47写道:

> After a little inspection, I found that elements (window state) are stored
> in namespace TimeWindow{start=1,end=11}, in your case, and trigger count
> (trigger state) is stored in namespace TimeWindow{start=1,end=15}, but
> WindowReaderOperator only tries to find keys and namespaces related to
> window state.
>
> Dongwon Kim <eastcirc...@gmail.com> 于2022年4月19日周二 15:29写道:
>
>> Hi,
>>
>> I'm using Flink-1.14.4 and failed to load in WindowReaderFunction the
>> state of a stateful trigger attached to a session window.
>> I found that the following data become available in WindowReaderFunction:
>> - the state defined in the ProcessWindowFunction
>> - the registered timers of the stateful trigger attached to the session
>> window
>> - all the elements of the window
>> , but the state of the stateful trigger attached to the session window is
>> not available when using State Processor API.
>> In other words, the following code always returns null when used with
>> session windows:
>>
>>>             ReducingState<Long> state =
>>> context.triggerState(triggerCountDesc);
>>>             Long val = state.get();
>>>
>> On the other hand, the above code snippet returns expected data when used
>> with sliding and tumbling windows.
>>
>> To explain the problem, I made up an example in a similar spirit to
>> o.a.f.state.api.SavepointWindowReaderITCase.
>> Here you can find three test cases each with different types of
>> event-time windows: Session, Sliding, and Tumbling.
>> With sliding and tumbling windows, I can read the state of the trigger
>> attached to the windows in WindowReaderFunction.
>> However, with a session window, I cannot read the state of the trigger in
>> WindowReaderFunction.
>>
>> Is it a bug, or did I miss something?
>>
>> Best,
>>
>> Dongwon
>>
>>

Reply via email to