You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Stephan Ewen (JIRA)" <ji...@apache.org> on 2015/11/11 11:08:10 UTC

[jira] [Commented] (FLINK-2999) Support connected keyed streams

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

Stephan Ewen commented on FLINK-2999:
-------------------------------------

I need this as well!

> Support connected keyed streams
> -------------------------------
>
>                 Key: FLINK-2999
>                 URL: https://issues.apache.org/jira/browse/FLINK-2999
>             Project: Flink
>          Issue Type: Improvement
>          Components: Streaming
>    Affects Versions: 1.0
>            Reporter: Fabian Hueske
>            Assignee: Stephan Ewen
>
> It would be nice to add support for connected keyed streams to enable key-partitioned state in Co*Functions.
> This could be done by simply connecting two keyed Streams or adding a new method to connect and key two streams as one operation.
> {code}
> DataStream<X> s1 = ...
> DataStream<Y> s2 = ...
> // alternative 1
> s1
>   .keyBy(0)
>   .connect(s2.keyBy(1))
>   .map(new KeyedCoMap());
> // alternative 2
> s1
>   .connectByKey(s2, 0, 1)
>   .map(new KeyedCoMap());
> public class KeyedCoMap implements RichCoMapFunction<X,Y,Z> {
>   
>   OperatorState<A> s;
>   public void open() {
>     s = getRuntimeContext().getKeyValueState("abc", A.class, new A());
>   }
>   // ...
> }
> {code}



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