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.
