I have data coming in as id, float, float, float. I want min (), max () and sum () to order the fields and group them by id value.
Using flatMap I have Tuple4 with bits, but I'm not sure how to send it to the next step.
What I have:
dataStream.flatMap(new mapper()).keyBy(0) .timeWindowAll(Time.of(5, TimeUnit.SECONDS)).min(1) .timeWindowAll(Time.of(5, TimeUnit.SECONDS)).sum(2) .timeWindowAll(Time.of(5, TimeUnit.SECONDS)).sum(3) .map(new printstuff());
Is this the right way to handle this? Or do I need to put each timeWindowAll in my own statement using keyBy etc.?
source share