Is there a way to remove windowing from a PCollection?

Let's say I had the following code:
      PCollection<String> windowedWords = parsed
          .apply(Window.<String>into(
            FixedWindows.of(Duration.standardSeconds(30))));

      PCollection<KV<String, Long>> eventCounts =
windowedWords.apply(Count.perElement());

      // Don't window anymore for the GroupByKey
      PCollection<KV<String, Iterable<Long>>> grouped =
eventCounts.apply(GroupByKey.<String, Long>create());

      PCollection<String> formattedCounts = grouped.apply(ParDo.of(new
TimedFN()));

I've added the window and performed the counts. In the GroupByKey, I no
longer want windowing to apply. I want to group by the key across windows
now. The Iterable that comes back from the GroupByKey only has the one Long
from its Window instead of all N Longs from all Windows. How do you do
remove the Window to GroupByKey for all times?

Thanks,

Jesse

Reply via email to