T- type of elements being windowed
W- window type
public abstract class PartitioningWindowFn<T,W extends BoundedWindow> extends NonMergingWindowFn<T,W>
WindowFnthat places each value into exactly one window based on its timestamp and never merges windows.
|Constructor and Description|
|Modifier and Type||Method and Description|
Returns true if this
Returns the single window to which elements with this timestamp belong.
Given a timestamp and element, returns the set of windows into which it should be placed.
Returns the default
Returns the output timestamp to use for data depending on the given
getWindowTypeDescriptor, isCompatible, populateDisplayData, verifyCompatibility, windowCoder
public final java.util.Collection<W> assignWindows(WindowFn.AssignContext c)
public WindowMappingFn<W> getDefaultWindowMappingFn()
WindowMappingFnto use to map main input windows to side input windows. This should accept arbitrary main input windows, and produce a
BoundedWindowthat can be produced by this
inputTimestampin the specified
The result of this method must be between
window.maxTimestamp() (inclusive on both sides).
This function must be monotonic across input timestamps. Specifically, if
A < B,
getOutputTime(A, window) <= getOutputTime(B, window).
WindowFn that doesn't produce overlapping windows, this can (and typically
should) just return
inputTimestamp. In the presence of overlapping windows, it is
suggested that the result in later overlapping windows is past the end of earlier windows
so that the later windows don't prevent the watermark from
progressing past the end of the earlier window.
public final boolean assignsToOneWindow()
WindowFnalways assigns an element to exactly one window.
If this varies per-element, or cannot be determined, conservatively return false.
By default, returns false.