Hi all,

When I use out.collect() twice inside a faltMap, the output is sometimes
and randomly skewed. Take this example:

final StreamExecutionEnvironment env =
StreamExecutionEnvironment.createLocalEnvironment();
    env.generateSequence(1, 100000)
        .flatMap((Long t, Collector<String> out) -> {
            out.collect("line1");
            out.collect("line2");
        })

.writeAsText("test",FileSystem.WriteMode.OVERWRITE).setParallelism(1);
env.execute("Test");

I expect the output to be
line1
line2
line1
line2
...

But some resulting lines (18 out of 200000) were:
line2
line2
and the same for line1.

What could be the reason for this?

Best,
Yassine

Reply via email to