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<Tuple2<Integer,Long>> res = stream.flatMap(new
FlatMapFunction<tuple3<int, int, int>, Tuple2<Integer,Long>>() {

    @Override
    public void flatMap(Tuple3<int, int, int> t,
Collector<Tuple2<Integer,Long>> collector) throws Exception {

        collector.collect(parse(t.f_3));
    }
});


that parse will return for example 6 tuples2 and I want them inserted into
res datastream.

Reply via email to