[ https://issues.apache.org/jira/browse/FLINK-5023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15649615#comment-15649615 ]
Xiaogang Shi edited comment on FLINK-5023 at 11/9/16 2:52 AM: -------------------------------------------------------------- [~aljoscha] In that case, i think we should provide {{UpdatableState}} instead of {{ReadableState}}. Now {{State}} is updatable because it has the method {{clear()}}. I would prefer {{ReadableState}} inherits from {{State}}; otherwise, it's very weird that a readable state is not a state. >From this point, i think the base {{State}} should be readable, and a new >interface {{UpdatableState}} could be provided to abstract those states >allowing both reads and writes. was (Author: xiaogang.shi): @Aljoscha Krettek In that case, i think we should provide {{UpdatableState}} instead of {{ReadableState}}. Now {{State}} is updatable because it has the method {{clear()}}. I would prefer {{ReadableState}} inherits from {{State}}; otherwise, it's very weird that a readable state is not a state. >From this point, i think the base {{State}} should be readable, and a new >interface {{UpdatableState}} could be provided to abstract those states >allowing both reads and writes. > 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.4#6332)