I'm new to Dataflow, so this is probably an easy question.
I want to try out the Sessions windowing strategy. According to the windowing documentation, windowing is not applied until we've done a GroupByKey, so I'm trying to do that.
However, when I look at my pipeline in Google Cloud Platform, I can see that MapElements returns elements, but no elements are returned by GroupByKey ("Elements Added: -"). What am I doing wrong when grouping by key?
Here's the most relevant part of the code:
events = events
.apply(Window.named("eventsSessionsWindowing")
.<MyEvent>into(Sessions.withGapDuration(Duration.standardSeconds(3)))
);
PCollection<KV<String, MyEvent>> eventsKV = events
.apply(MapElements
.via((MyEvent e) -> KV.of(ExtractKey(e), e))
.withOutputType(new TypeDescriptor<KV<String, MyEvent>>() {}));
PCollection<KV<String, Iterable<MyEvent>>> eventsGrouped = eventsKV.apply(GroupByKey.<String, MyEvent>create());