Re: Flink flatMap to pass a tuple and get multiple tuple

2018-04-27 Thread TechnoMage
Any itterable of Tuples will work for a for loop: List, Set, etc. Michael > On Apr 27, 2018, at 10:47 AM, Soheil Pourbafrani > wrote: > > Thanks, what did you consider the return type of parse method? Arraylist of > tuples? > > On Friday, April 27, 2018, TechnoMage

Re: Flink flatMap to pass a tuple and get multiple tuple

2018-04-27 Thread TechnoMage
it would look more like: for (Tuple2<> t2 : parse(t.f3) { collector.collect(t2); } Michael > On Apr 27, 2018, at 9:08 AM, Soheil Pourbafrani wrote: > > Hi, I want to use flatMap to pass to function namely 'parse' a tuple and it > will return multiple tuple, that each should be a recor

Flink flatMap to pass a tuple and get multiple tuple

2018-04-27 Thread Soheil Pourbafrani
Hi, I want to use flatMap to pass to function namely 'parse' a tuple and it will return multiple tuple, that each should be a record in datastream object. Something like this: DataStream> res = stream.flatMap(new FlatMapFunction, Tuple2>() { @Override public void flatMap(Tuple3 t, Collec