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 <gi...@git.apache.org> on 2017/02/06 13:52:11 UTC

[GitHub] flink pull request #3272: [FLINK-5721] Add FoldingState to State Documentati...

GitHub user aljoscha opened a pull request:

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

    [FLINK-5721] Add FoldingState to State Documentation

    R: @NicoK 

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

    $ git pull https://github.com/aljoscha/flink add-fold-state-doc

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

    https://github.com/apache/flink/pull/3272.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 #3272
    
----
commit e45a2291ab0f5959a03dbd544c90a544bbf6b7ad
Author: Aljoscha Krettek <al...@gmail.com>
Date:   2017-02-06T13:51:17Z

    [FLINK-5721] Add FoldingState to State Documentation

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3272: [FLINK-5721] Add FoldingState to State Documentati...

Posted by NicoK <gi...@git.apache.org>.
Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3272#discussion_r99615295
  
    --- Diff: docs/dev/stream/state.md ---
    @@ -126,8 +136,8 @@ To get a state handle, you have to create a `StateDescriptor`. This holds the na
     (as we will see later, you can create several states, and they have to have unique names so
     that you can reference them), the type of the values that the state holds, and possibly
     a user-specified function, such as a `ReduceFunction`. Depending on what type of state you
    -want to retrieve, you create either a `ValueStateDescriptor`, a `ListStateDescriptor` or
    -a `ReducingStateDescriptor`.
    +want to retrieve, you create either a `ValueStateDescriptor`, a `ListStateDescriptor`,
    +`ReducingStateDescriptor` or a `FoldingStateDescriptor`.
    --- End diff --
    
    **a** `ReducingStateDescriptor`**,** or a ...


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3272: [FLINK-5721] Add FoldingState to State Documentati...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3272#discussion_r99614214
  
    --- Diff: docs/dev/stream/state.md ---
    @@ -113,9 +113,19 @@ be retrieved using `Iterable<T> get()`.
     added to the state. The interface is the same as for `ListState` but elements added using
     `add(T)` are reduced to an aggregate using a specified `ReduceFunction`.
     
    +* `FoldingState<T, ACC>`: This keeps a single value that represents the aggregation of all values
    +added to the state. Contrary to `ReducingState`, the aggregate type is different from the type of
    +elements that are added to the state. The interface is the same as for `ListState` but elements
    +added using `add(T)` are folded into an aggregate using a specified `FoldFunction`.
    +
     All types of state also have a method `clear()` that clears the state for the currently
     active key, i.e. the key of the input element.
     
    +<span class="label label-danger">Attention</span> `FoldingState` will be deprecated in one of
    +the next versions of Flink and will be completely removed in the Future. A more general
    +alternative will be provided.
    +
    +
    --- End diff --
    
    empty line


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3272: [FLINK-5721] Add FoldingState to State Documentati...

Posted by aljoscha <gi...@git.apache.org>.
Github user aljoscha closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3272: [FLINK-5721] Add FoldingState to State Documentation

Posted by aljoscha <gi...@git.apache.org>.
Github user aljoscha commented on the issue:

    https://github.com/apache/flink/pull/3272
  
    Thanks @uce and @NicoK. I incorporated your suggestions and will merge now.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3272: [FLINK-5721] Add FoldingState to State Documentati...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3272#discussion_r99614243
  
    --- Diff: docs/dev/stream/state.md ---
    @@ -113,9 +113,19 @@ be retrieved using `Iterable<T> get()`.
     added to the state. The interface is the same as for `ListState` but elements added using
     `add(T)` are reduced to an aggregate using a specified `ReduceFunction`.
     
    +* `FoldingState<T, ACC>`: This keeps a single value that represents the aggregation of all values
    +added to the state. Contrary to `ReducingState`, the aggregate type is different from the type of
    +elements that are added to the state. The interface is the same as for `ListState` but elements
    +added using `add(T)` are folded into an aggregate using a specified `FoldFunction`.
    +
     All types of state also have a method `clear()` that clears the state for the currently
     active key, i.e. the key of the input element.
     
    +<span class="label label-danger">Attention</span> `FoldingState` will be deprecated in one of
    +the next versions of Flink and will be completely removed in the Future. A more general
    --- End diff --
    
    Future should be lower case


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3272: [FLINK-5721] Add FoldingState to State Documentati...

Posted by NicoK <gi...@git.apache.org>.
Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3272#discussion_r99614763
  
    --- Diff: docs/dev/stream/state.md ---
    @@ -113,9 +113,19 @@ be retrieved using `Iterable<T> get()`.
     added to the state. The interface is the same as for `ListState` but elements added using
     `add(T)` are reduced to an aggregate using a specified `ReduceFunction`.
     
    +* `FoldingState<T, ACC>`: This keeps a single value that represents the aggregation of all values
    +added to the state. Contrary to `ReducingState`, the aggregate type is different from the type of
    --- End diff --
    
    ...the aggregate type **may be** different from...


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---