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

ASF GitHub Bot commented on FLINK-5023:
---------------------------------------

Github user aljoscha commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2768#discussion_r89129638
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/api/common/state/ValueState.java ---
    @@ -37,30 +37,24 @@
      * @param <T> Type of the value in the state.
      */
     @PublicEvolving
    -public interface ValueState<T> extends State {
    -
    +public interface ValueState<T> extends UpdatableState<T> {
        /**
    -    * Returns the current value for the state. When the state is not
    -    * partitioned the returned value is the same for all inputs in a given
    -    * operator instance. If state partitioning is applied, the value 
returned
    -    * depends on the current operator input, as the operator maintains an
    -    * independent state for each partition.
    -    * 
    -    * @return The operator state value corresponding to the current input.
    -    * 
    +    * Returns the current value for the state. The method performs the same
    +    * functionality as {@link State#get()}.
    +    *
         * @throws IOException Thrown if the system cannot access the state.
         */
    +   @Deprecated
    --- End diff --
    
    Please also add a `@deprecated` description in the Javadoc, pointing to use 
`get()`.


> 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)

Reply via email to