You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Aljoscha Krettek (JIRA)" <ji...@apache.org> on 2016/11/07 10:30:58 UTC

[jira] [Commented] (FLINK-5024) Add SimpleStateDescriptor to clarify the concepts

    [ https://issues.apache.org/jira/browse/FLINK-5024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15643773#comment-15643773 ] 

Aljoscha Krettek commented on FLINK-5024:
-----------------------------------------

The idea sounds reasonable. If you look at when I initially added {{StateDescriptors}} it was actually like that: https://github.com/apache/flink/commit/caf4672#diff-fa60b4ffb3c6ac5e6444f1d8efb66f30. Only {{ValueState}} descriptor had the added functionality of storing a default value.

> Add SimpleStateDescriptor to clarify the concepts
> -------------------------------------------------
>
>                 Key: FLINK-5024
>                 URL: https://issues.apache.org/jira/browse/FLINK-5024
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: Xiaogang Shi
>
> Currently, StateDescriptors accept two type arguments : the first one is the type of the created state and the second one is the type of the values in the states. 
> The concepts however is a little confusing here because in ListStates, the arguments passed to the StateDescriptors are the types of the list elements instead of the lists. It also makes the implementation of MapStates difficult.
> I suggest not to put the type serializer in StateDescriptors, making StateDescriptors independent of the data structures of the values. 
> A new type of StateDescriptor named SimpleStateDescriptor can be provided to abstract those states (namely ValueState, ReducingState and FoldingState) whose states are not composited. 
> The states (e.g. ListStates and MapStates) can implement their own descriptors according to their data structures. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)