You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Gyula Fora (JIRA)" <ji...@apache.org> on 2015/07/25 16:47:04 UTC

[jira] [Created] (FLINK-2405) Add stateful transformations using lambdas to the Streaming Scala API

Gyula Fora created FLINK-2405:
---------------------------------

             Summary: Add stateful transformations using lambdas to the Streaming Scala API
                 Key: FLINK-2405
                 URL: https://issues.apache.org/jira/browse/FLINK-2405
             Project: Flink
          Issue Type: New Feature
          Components: Scala API, Streaming
            Reporter: Gyula Fora
            Priority: Minor


I propose to extend the Streaming Scala API methods (map, flatmap, filter etc) with versions that take stateful functions as lambdas. This would allow for a nice functional way of defining stateful transformations:

Example:
def mapWithState( fun: (I, Option[S]) => (O, Option[S]), stateByKey: Boolean = false)

The stateByKey optional flag allows the user to partition the state by key when applied on a KeyedDataStream.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)