GitHub user aljoscha opened a pull request:
https://github.com/apache/flink/pull/1347
[refactor] Rename OperatorState to ValueState, add ListState
ValueState behaves exactly the same as OperatorState. ListState is a
stateful list to which elements can be added and for which the elements
that it contains can be obtained. To create a ValueState the user
passes a ValueStateIdentifier to
StreamingRuntimeContext.getPartitionedState() while they would pass a
ListStateIdentifier to the same function to retrieve a ListState.
This change is necessary to give the system more information about the
nature of the operator state. We want this to be able to do incremental
snapshots. This would not be possible, for example, if the user had a
List as a state. Inside OperatorState this list would be opaque and
Flink could not create good incremental snapshots.
This also refactors the StateBackend. Before, the logic for partitioned
state was spread out over StreamingRuntimeContext,
AbstractStreamOperator and StateBackend. Now it is consolidated in
StateBackend.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/aljoscha/flink state-enhance
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/1347.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 #1347
----
commit 04973e3a1464521af1fabb15fb302ffe0da2b505
Author: Aljoscha Krettek <[email protected]>
Date: 2015-11-09T17:11:59Z
[refactor] Rename OperatorState to ValueState, add ListState
ValueState behaves exactly the same as OperatorState. ListState is a
stateful list to which elements can be added and for which the elements
that it contains can be obtained. To create a ValueState the user
passes a ValueStateIdentifier to
StreamingRuntimeContext.getPartitionedState() while they would pass a
ListStateIdentifier to the same function to retrieve a ListState.
This change is necessary to give the system more information about the
nature of the operator state. We want this to be able to do incremental
snapshots. This would not be possible, for example, if the user had a
List as a state. Inside OperatorState this list would be opaque and
Flink could not create good incremental snapshots.
This also refactors the StateBackend. Before, the logic for partitioned
state was spread out over StreamingRuntimeContext,
AbstractStreamOperator and StateBackend. Now it is consolidated in
StateBackend.
----
---
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.
---