(Thanks, I tried the alternate approach but that doesn't work ..

 - The custom WindowFn hack ensures that FileIO will write all elements of
the Iterable into a single file. The elementCountAtLeast(1) trigger on the
custom WindowFn makes FileIO do this early, without waiting for the end of
the interval.

 - If I output KVs with the Key being some sort of an identifier for the
iterable, it would achieve the first goal  (FileIO will write all elements
of a given iterable into a single file), but the second goal that it should
do it early without waiting for the end of the interval wouldn't be
accomplished, because FileIO does not operate on Iterables but needs
individual records.

  (I can't feed a PCollection<KV<Long, Iterable<Type>>> to FileIO, but
instead I should flatten it out to PCollection<KV<Long, Type>> and there is
no way to trigger early firings on the window such that the pane is
guaranteed to have all elements of a given key if at least one element in
that pane has that key)
)

>

Reply via email to