flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan Ewen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-2983) Add StateLoader as an alternative to default KvState
Date Fri, 06 Nov 2015 13:31:27 GMT

    [ https://issues.apache.org/jira/browse/FLINK-2983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14993667#comment-14993667

Stephan Ewen commented on FLINK-2983:

I think this is a good way, to wait for some more evidence for such patterns. Saves us from
overloading the APIs/system.

> Add StateLoader as an alternative to default KvState 
> -----------------------------------------------------
>                 Key: FLINK-2983
>                 URL: https://issues.apache.org/jira/browse/FLINK-2983
>             Project: Flink
>          Issue Type: Improvement
>          Components: Streaming
>            Reporter: Gyula Fora
> To create key-value states the user currently needs to specify a default state value
that will be returned on first access. Even though this support nulls for implementing the
initialization logic this is not a clean solution.
> I propose to allow the user to pass a StateLoader instance which would load the default
> interface StateLoader<I, K,S>{
>     S loadState(K key, I currentInput);
> }
> The default value implementation could also use the state loader logic where the stateloader
would just return a copy of the given value on the loadState call.

This message was sent by Atlassian JIRA

View raw message