[
https://issues.apache.org/jira/browse/FLINK-5023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15853735#comment-15853735
]
ASF GitHub Bot commented on FLINK-5023:
---------------------------------------
Github user shixiaogang commented on the issue:
https://github.com/apache/flink/pull/2768
@aljoscha That way, it's very confusing that a `ReadableState` is not a
`State`. Hence I made `State` read-only and introduced the `UpdatableState`
interface who extends `State` with the method `clear()`.
These changes (mainly the introduction of the `get()` method) are intended
to remove the duplicated code. As they have little relationship with the
implementation of map states. I think it's okay not to change these interfaces
now.
But I prefer to rethink the state hierarchy in the near future because
there exists too much duplicated code now.
> Add get() method in State interface
> -----------------------------------
>
> Key: FLINK-5023
> URL: https://issues.apache.org/jira/browse/FLINK-5023
> Project: Flink
> Issue Type: Improvement
> Components: State Backends, Checkpointing
> Reporter: Xiaogang Shi
> Assignee: Xiaogang Shi
>
> Currently, the only method provided by the State interface is `clear()`. I
> think we should provide another method called `get()` to return the
> structured value (e.g., value, list, or map) under the current key.
> In fact, the functionality of `get()` has already been implemented in all
> types of states: e.g., `value()` in ValueState and `get()` in ListState. The
> modification to the interface can better abstract these states.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)