Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
public final class BatchWindows extends Windows<TimeWindow> {
		
		/**
		 * Return a window definition with the given window size.
		 * <p> 
		 * This represents "batching" window semantics, which are fixed-size,
		 * gap-less, non-overlapping windows. Batched windows use the current
		 * stream time when determining which window an event fits into instead
		 * of the event time (as the other window types use). This allows users
         * to batch together records of the same key over a window of time.
		 * <p>
 		 * The window boundaries are inclusive of the start point and exclusive,
		 * of the end point. This means that a BatchWindows of size 1000 would have
		 * windows from [0,1000),[1000,2000),etc...
         * <p>
         * Note that batch windows will always accept late arriving data, and
		 * should only be used in situations where the ordering of data is not
		 * necessarily important to the semantics of your application.
		 */
		public static BatchWindows ofSize(final Duration size) { ... }
    
}

Here is an example of how events would map to windows:

Image RemovedImage Added


The example in the motivation section then becomes:

...