GitHub user shixiaogang opened a pull request:

    https://github.com/apache/flink/pull/2768

    [FLINK-5023 & FLINK-5024] Add SimpleStateDescriptor to clarify the concepts

    Changes in the definition of `State` and `StateDescriptor`:
    - Add `get()` in the `State` interface.
    - Remove type serializers of state values from `StateDescriptor`s.
    - Add `SimpleStateDescriptor` to simplify the construction of 
`ValueStateDescriptor`, `ReducingStateDescriptor` and `FoldingStateDescriptor`.
    - Changes the definition of `KeyedStateBackend` and 
`AbstractKeyedStateBackend` accordingly.
    - Modify the implementation of `ListStateDescriptor` accordingly.
    
    Changes in HeapStateBackend:
    - Let `AbstractHeapState` not implement the `State` interface. The 
`clear()` method now is removed from `AbstractHeapState`.
    - Add `HeapSimpleState` to simplify the implementation of `HeapValueState`, 
`HeapReducingState` and `HeapFoldingState`.
    - Change the implementation of `HeapValueState`, `HeapReducingState` and 
`HeapFoldingState` accordingly.
    
    Changes in RocksDBStateBackend:
    - Let `AbstractRocksDBState` not implement the `State` interface, removing 
the `clear()` method. Now, `AbstractRocksDBState` does not depend on the types 
of `State` and `StateDescriptor` any more.
    - Add `RocksDBSimpleState` to simplify the implementation of 
`RocksDBValueState`, `RocksDBReducingState` and `RocksDBFoldingState`.
    - Change the implementation of `RocksDBValueState`, `RocksDBReducingState` 
and `RocksDBFoldingState` accordingly.
    
    Others:
    - Update the usage of `State`s in the implementation of window operators.
    - Update the usage of `State`s in unit tests.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/alibaba/flink flink-5023

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/2768.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2768
    
----
commit 007a93b454e693bc3662f540ac5f33e899ce9058
Author: xiaogang.sxg <[email protected]>
Date:   2016-11-08T02:38:22Z

    Refactor the interface of State and StateDescriptor

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to