[flink] 03/04: [FLINK-17376] Remove deprecated state access methods
This is an automated email from the ASF dual-hosted git repository. aljoscha pushed a commit to branch release-1.11 in repository https://gitbox.apache.org/repos/asf/flink.git commit 23f0e41604689d271d9e51298294244d7be86c36 Author: Ghildiyal AuthorDate: Sat May 16 16:48:38 2020 +0530 [FLINK-17376] Remove deprecated state access methods --- docs/dev/stream/state/state.md | 10 + docs/dev/stream/state/state.zh.md | 9 + .../kafka/FlinkKafkaConsumerBaseTest.java | 13 -- .../connectors/rabbitmq/RMQSourceTest.java | 3 +- .../flink/api/common/functions/RuntimeContext.java | 46 -- .../functions/util/AbstractRuntimeUDFContext.java | 10 - .../flink/api/common/state/OperatorStateStore.java | 38 -- .../flink/cep/operator/CepRuntimeContext.java | 7 .../flink/cep/operator/CepRuntimeContextTest.java | 13 -- .../state/api/runtime/SavepointRuntimeContext.java | 13 -- .../runtime/state/DefaultOperatorStateBackend.java | 25 .../runtime/state/OperatorStateBackendTest.java| 4 +- .../api/functions/async/RichAsyncFunction.java | 7 .../api/operators/StreamingRuntimeContext.java | 9 - .../api/functions/async/RichAsyncFunctionTest.java | 13 -- .../api/operators/StreamingRuntimeContextTest.java | 28 - .../collect/utils/MockOperatorStateStore.java | 11 -- .../StatefulJobSavepointMigrationITCase.scala | 2 +- ...StatefulJobWBroadcastStateMigrationITCase.scala | 6 +-- 19 files changed, 10 insertions(+), 257 deletions(-) diff --git a/docs/dev/stream/state/state.md b/docs/dev/stream/state/state.md index 728beab..389a03e 100644 --- a/docs/dev/stream/state/state.md +++ b/docs/dev/stream/state/state.md @@ -115,11 +115,6 @@ added to the state. Contrary to `ReducingState`, the aggregate type may be diffe of elements that are added to the state. The interface is the same as for `ListState` but elements added using `add(IN)` are aggregated using a specified `AggregateFunction`. -* `FoldingState`: This keeps a single value that represents the aggregation of all values -added to the state. Contrary to `ReducingState`, the aggregate type may be different from the type -of elements that are added to the state. The interface is similar to `ListState` but elements -added using `add(T)` are folded into an aggregate using a specified `FoldFunction`. - * `MapState`: This keeps a list of mappings. You can put key-value pairs into the state and retrieve an `Iterable` over all currently stored mappings. Mappings are added using `put(UK, UV)` or `putAll(Map)`. The value associated with a user key can be retrieved using `get(UK)`. The iterable @@ -129,8 +124,6 @@ You can also use `isEmpty()` to check whether this map contains any key-value ma 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. -Attention `FoldingState` and `FoldingStateDescriptor` have been deprecated in Flink 1.4 and will be completely removed in the future. Please use `AggregatingState` and `AggregatingStateDescriptor` instead. - It is important to keep in mind that these state objects are only used for interfacing with state. The state is not necessarily stored inside but might reside on disk or somewhere else. The second thing to keep in mind is that the value you get from the state @@ -142,7 +135,7 @@ To get a state handle, you have to create a `StateDescriptor`. This holds the na 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`, -a `ReducingStateDescriptor`, a `FoldingStateDescriptor` or a `MapStateDescriptor`. +a `ReducingStateDescriptor`, or a `MapStateDescriptor`. State is accessed using the `RuntimeContext`, so it is only possible in *rich functions*. Please see [here]({% link dev/user_defined_functions.md %}#rich-functions) for @@ -153,7 +146,6 @@ is available in a `RichFunction` has these methods for accessing state: * `ReducingState getReducingState(ReducingStateDescriptor)` * `ListState getListState(ListStateDescriptor)` * `AggregatingState getAggregatingState(AggregatingStateDescriptor)` -* `FoldingState getFoldingState(FoldingStateDescriptor)` * `MapState getMapState(MapStateDescriptor)` This is an example `FlatMapFunction` that shows how all of the parts fit together: diff --git a/docs/dev/stream/state/state.zh.md b/docs/dev/stream/state/state.zh.md index 5fe4825..16e5e96 100644 --- a/docs/dev/stream/state/state.zh.md +++ b/docs/dev/stream/state/state.zh.md @@ -107,23 +107,17 @@ keyed state 接口提供不同类型状态的访问接口,这些状态都作 * `AggregatingState`: 保留一个单值,表示添加到状态的所有值的聚合。和 `ReducingState` 相反的是, 聚合类型可能与 添加到状态的元素的类型不同。
[flink] 03/04: [FLINK-17376] Remove deprecated state access methods
This is an automated email from the ASF dual-hosted git repository. aljoscha pushed a commit to branch release-1.11 in repository https://gitbox.apache.org/repos/asf/flink.git commit 23f0e41604689d271d9e51298294244d7be86c36 Author: Ghildiyal AuthorDate: Sat May 16 16:48:38 2020 +0530 [FLINK-17376] Remove deprecated state access methods --- docs/dev/stream/state/state.md | 10 + docs/dev/stream/state/state.zh.md | 9 + .../kafka/FlinkKafkaConsumerBaseTest.java | 13 -- .../connectors/rabbitmq/RMQSourceTest.java | 3 +- .../flink/api/common/functions/RuntimeContext.java | 46 -- .../functions/util/AbstractRuntimeUDFContext.java | 10 - .../flink/api/common/state/OperatorStateStore.java | 38 -- .../flink/cep/operator/CepRuntimeContext.java | 7 .../flink/cep/operator/CepRuntimeContextTest.java | 13 -- .../state/api/runtime/SavepointRuntimeContext.java | 13 -- .../runtime/state/DefaultOperatorStateBackend.java | 25 .../runtime/state/OperatorStateBackendTest.java| 4 +- .../api/functions/async/RichAsyncFunction.java | 7 .../api/operators/StreamingRuntimeContext.java | 9 - .../api/functions/async/RichAsyncFunctionTest.java | 13 -- .../api/operators/StreamingRuntimeContextTest.java | 28 - .../collect/utils/MockOperatorStateStore.java | 11 -- .../StatefulJobSavepointMigrationITCase.scala | 2 +- ...StatefulJobWBroadcastStateMigrationITCase.scala | 6 +-- 19 files changed, 10 insertions(+), 257 deletions(-) diff --git a/docs/dev/stream/state/state.md b/docs/dev/stream/state/state.md index 728beab..389a03e 100644 --- a/docs/dev/stream/state/state.md +++ b/docs/dev/stream/state/state.md @@ -115,11 +115,6 @@ added to the state. Contrary to `ReducingState`, the aggregate type may be diffe of elements that are added to the state. The interface is the same as for `ListState` but elements added using `add(IN)` are aggregated using a specified `AggregateFunction`. -* `FoldingState`: This keeps a single value that represents the aggregation of all values -added to the state. Contrary to `ReducingState`, the aggregate type may be different from the type -of elements that are added to the state. The interface is similar to `ListState` but elements -added using `add(T)` are folded into an aggregate using a specified `FoldFunction`. - * `MapState`: This keeps a list of mappings. You can put key-value pairs into the state and retrieve an `Iterable` over all currently stored mappings. Mappings are added using `put(UK, UV)` or `putAll(Map)`. The value associated with a user key can be retrieved using `get(UK)`. The iterable @@ -129,8 +124,6 @@ You can also use `isEmpty()` to check whether this map contains any key-value ma 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. -Attention `FoldingState` and `FoldingStateDescriptor` have been deprecated in Flink 1.4 and will be completely removed in the future. Please use `AggregatingState` and `AggregatingStateDescriptor` instead. - It is important to keep in mind that these state objects are only used for interfacing with state. The state is not necessarily stored inside but might reside on disk or somewhere else. The second thing to keep in mind is that the value you get from the state @@ -142,7 +135,7 @@ To get a state handle, you have to create a `StateDescriptor`. This holds the na 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`, -a `ReducingStateDescriptor`, a `FoldingStateDescriptor` or a `MapStateDescriptor`. +a `ReducingStateDescriptor`, or a `MapStateDescriptor`. State is accessed using the `RuntimeContext`, so it is only possible in *rich functions*. Please see [here]({% link dev/user_defined_functions.md %}#rich-functions) for @@ -153,7 +146,6 @@ is available in a `RichFunction` has these methods for accessing state: * `ReducingState getReducingState(ReducingStateDescriptor)` * `ListState getListState(ListStateDescriptor)` * `AggregatingState getAggregatingState(AggregatingStateDescriptor)` -* `FoldingState getFoldingState(FoldingStateDescriptor)` * `MapState getMapState(MapStateDescriptor)` This is an example `FlatMapFunction` that shows how all of the parts fit together: diff --git a/docs/dev/stream/state/state.zh.md b/docs/dev/stream/state/state.zh.md index 5fe4825..16e5e96 100644 --- a/docs/dev/stream/state/state.zh.md +++ b/docs/dev/stream/state/state.zh.md @@ -107,23 +107,17 @@ keyed state 接口提供不同类型状态的访问接口,这些状态都作 * `AggregatingState`: 保留一个单值,表示添加到状态的所有值的聚合。和 `ReducingState` 相反的是, 聚合类型可能与 添加到状态的元素的类型不同。
[flink] 03/04: [FLINK-17376] Remove deprecated state access methods
This is an automated email from the ASF dual-hosted git repository. aljoscha pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git commit 276332e11277e7e50789e4eaed0f11ae59a0f8d1 Author: Ghildiyal AuthorDate: Sat May 16 16:48:38 2020 +0530 [FLINK-17376] Remove deprecated state access methods --- docs/dev/stream/state/state.md | 10 + docs/dev/stream/state/state.zh.md | 9 + .../kafka/FlinkKafkaConsumerBaseTest.java | 13 -- .../connectors/rabbitmq/RMQSourceTest.java | 3 +- .../flink/api/common/functions/RuntimeContext.java | 46 -- .../functions/util/AbstractRuntimeUDFContext.java | 10 - .../flink/api/common/state/OperatorStateStore.java | 38 -- .../flink/cep/operator/CepRuntimeContext.java | 7 .../flink/cep/operator/CepRuntimeContextTest.java | 13 -- .../state/api/runtime/SavepointRuntimeContext.java | 13 -- .../runtime/state/DefaultOperatorStateBackend.java | 25 .../runtime/state/OperatorStateBackendTest.java| 4 +- .../api/functions/async/RichAsyncFunction.java | 7 .../api/operators/StreamingRuntimeContext.java | 9 - .../api/functions/async/RichAsyncFunctionTest.java | 13 -- .../api/operators/StreamingRuntimeContextTest.java | 28 - .../collect/utils/MockOperatorStateStore.java | 11 -- .../StatefulJobSavepointMigrationITCase.scala | 2 +- ...StatefulJobWBroadcastStateMigrationITCase.scala | 6 +-- 19 files changed, 10 insertions(+), 257 deletions(-) diff --git a/docs/dev/stream/state/state.md b/docs/dev/stream/state/state.md index 728beab..389a03e 100644 --- a/docs/dev/stream/state/state.md +++ b/docs/dev/stream/state/state.md @@ -115,11 +115,6 @@ added to the state. Contrary to `ReducingState`, the aggregate type may be diffe of elements that are added to the state. The interface is the same as for `ListState` but elements added using `add(IN)` are aggregated using a specified `AggregateFunction`. -* `FoldingState`: This keeps a single value that represents the aggregation of all values -added to the state. Contrary to `ReducingState`, the aggregate type may be different from the type -of elements that are added to the state. The interface is similar to `ListState` but elements -added using `add(T)` are folded into an aggregate using a specified `FoldFunction`. - * `MapState`: This keeps a list of mappings. You can put key-value pairs into the state and retrieve an `Iterable` over all currently stored mappings. Mappings are added using `put(UK, UV)` or `putAll(Map)`. The value associated with a user key can be retrieved using `get(UK)`. The iterable @@ -129,8 +124,6 @@ You can also use `isEmpty()` to check whether this map contains any key-value ma 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. -Attention `FoldingState` and `FoldingStateDescriptor` have been deprecated in Flink 1.4 and will be completely removed in the future. Please use `AggregatingState` and `AggregatingStateDescriptor` instead. - It is important to keep in mind that these state objects are only used for interfacing with state. The state is not necessarily stored inside but might reside on disk or somewhere else. The second thing to keep in mind is that the value you get from the state @@ -142,7 +135,7 @@ To get a state handle, you have to create a `StateDescriptor`. This holds the na 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`, -a `ReducingStateDescriptor`, a `FoldingStateDescriptor` or a `MapStateDescriptor`. +a `ReducingStateDescriptor`, or a `MapStateDescriptor`. State is accessed using the `RuntimeContext`, so it is only possible in *rich functions*. Please see [here]({% link dev/user_defined_functions.md %}#rich-functions) for @@ -153,7 +146,6 @@ is available in a `RichFunction` has these methods for accessing state: * `ReducingState getReducingState(ReducingStateDescriptor)` * `ListState getListState(ListStateDescriptor)` * `AggregatingState getAggregatingState(AggregatingStateDescriptor)` -* `FoldingState getFoldingState(FoldingStateDescriptor)` * `MapState getMapState(MapStateDescriptor)` This is an example `FlatMapFunction` that shows how all of the parts fit together: diff --git a/docs/dev/stream/state/state.zh.md b/docs/dev/stream/state/state.zh.md index 5fe4825..16e5e96 100644 --- a/docs/dev/stream/state/state.zh.md +++ b/docs/dev/stream/state/state.zh.md @@ -107,23 +107,17 @@ keyed state 接口提供不同类型状态的访问接口,这些状态都作 * `AggregatingState`: 保留一个单值,表示添加到状态的所有值的聚合。和 `ReducingState` 相反的是, 聚合类型可能与 添加到状态的元素的类型不同。 接口与