Hi Antony,

there is a small custom windowing example in this github repo which can be
useful for you: https://github.com/Doctusoft/ds-dataflow-examples
The code is not documented yet, so let me know if you have any question
about it.

Regards,
Csabi



On Fri, 31 Mar 2017 at 18:04 Robert Bradshaw <[email protected]> wrote:

Yes, you can extend BoundedWindow to be your own Window type that has
additional members and different equality semantics (rather than
re-using IntervalWindow). The only requirement is that it have an
endpoint. (You'll also have to write a Coder for your new Window
subclass and return that in your WindowFn.

https://beam.apache.org/documentation/sdks/javadoc/0.4.0/org/apache/beam/sdk/transforms/windowing/WindowFn.html

On Thu, Mar 30, 2017 at 11:19 PM, Antony Mayi <[email protected]> wrote:
> Hi,
>
> is there a way to implement windowing so that each input event gets into
its
> own exclusive window?
>
> I can see the PartitioningWindowFn can be extended. If I implement the
> assignWindow to return new IntervalWindow with both start and end time set
> to the even time and in case there are two distinct events arriving at the
> same time (indistinguishable within Instant granularity), would this be
> processed as two separate windows without interfering the event data
during
> any transformations?
>
> My motivation is to to be able to flatmap individual input events into a
> pcollection of multiple elements that - being a single exclusive window -
> can be grouped/... independently of other events (even if the other event
> has same time).
>
> thanks,
> Antony.

Reply via email to