flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Ewen <se...@apache.org>
Subject Re: Flink Data Stream Union
Date Tue, 20 Oct 2015 17:01:31 GMT
Hi!

Two comments:

(1) The iterate() statement is probably wrong, as noticed by Anwar.

(2) Which version of Flink are you using? In 0.9.x, the Union operator is
not lock-safe, in 0.10, it should work well. The 0.10 release is coming up
shortly, you can try the 0.10-SNAPSHOT version already.

Greetings,
Stephan


On Mon, Oct 19, 2015 at 6:01 PM, Anwar Rizal <anrizal05@gmail.com> wrote:

> Do you really need to iterate ?
>
> On Mon, Oct 19, 2015 at 5:42 PM, flinkuser <gaayuu@gmail.com> wrote:
>
>>
>> Here is my code snippet but I find the union operator not workable.
>>
>> DataStream<String> msgDataStream1 = env.addSource((new
>> SocketSource(hostName1,port,'\n',-1))).filter(new
>> MessageFilter()).setParallelism(1);
>> DataStream<String> msgDataStream2 = env.addSource((new
>> SocketSource(hostName2,port,'\n',-1))).filter(new
>> MessageFilter()).setParallelism(1);
>>
>>
>> DataStream<String> stockStream =
>> (msgDataStream1.union(msgDataStream2)).iterate();
>>                                                 stockStream.print();
>>
>>
>> The stockStream doesn’t print the consolidated stream data. Sometimes
>> Stream1 is printed, sometimes none is printed.
>>
>> Can you please help me out, as of what is wrong here.
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Flink-Data-Stream-Union-tp3169.html
>> Sent from the Apache Flink User Mailing List archive. mailing list
>> archive at Nabble.com.
>>
>
>

Mime
View raw message