T - type of elements being windowedW - window typepublic abstract class PartitioningWindowFn<T,W extends BoundedWindow> extends NonMergingWindowFn<T,W>
WindowFn that places each value into exactly one window based on its timestamp and
never merges windows.WindowFn.AssignContext, WindowFn.MergeContext| Constructor and Description |
|---|
PartitioningWindowFn() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
assignsToSingleWindow()
Returns true if this
WindowFn assigns each element to a single window. |
abstract W |
assignWindow(Instant timestamp)
Returns the single window to which elements with this timestamp belong.
|
Collection<W> |
assignWindows(WindowFn.AssignContext c)
Given a timestamp and element, returns the set of windows into which it
should be placed.
|
Instant |
getOutputTime(Instant inputTimestamp,
W window) |
W |
getSideInputWindow(BoundedWindow window)
Returns the window of the side input corresponding to the given window of
the main input.
|
isNonMerging, mergeWindowsgetOutputTimeFn, isCompatible, windowCoderpublic abstract W assignWindow(Instant timestamp)
public final Collection<W> assignWindows(WindowFn.AssignContext c)
WindowFnassignWindows in class WindowFn<T,W extends BoundedWindow>public W getSideInputWindow(BoundedWindow window)
WindowFnAuthors of custom WindowFns should override this.
getSideInputWindow in class WindowFn<T,W extends BoundedWindow>public boolean assignsToSingleWindow()
WindowFnWindowFn assigns each element to a single window.assignsToSingleWindow in class WindowFn<T,W extends BoundedWindow>public Instant getOutputTime(Instant inputTimestamp, W window)
getOutputTime in class WindowFn<T,W extends BoundedWindow>