xuhuang created FLINK-37316:
-------------------------------
Summary: Add StateManager#getStateOptional and
StateManager#getState methods for DataStream V2
Key: FLINK-37316
URL: https://issues.apache.org/jira/browse/FLINK-37316
Project: Flink
Issue Type: New Feature
Reporter: xuhuang
Currently, the `StateManager` only provides the `getState` method. Below is the
method signature:
/**
* Get the specific list state.
*
* @param stateDeclaration of this state.
* @return the list state corresponds to the state declaration.
*/
<T> Optional<ListState<T>> getState(ListStateDeclaration<T>
stateDeclaration) throws Exception;
In most scenarios, the `getState` method will return a non-empty instance.
Therefore, we can consider providing another API that handles errors internally
for users and returns the state directly, rather than wrapping it in an
Optional.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)