Class WindowMappingFn<TargetWindowT extends BoundedWindow>
java.lang.Object
org.apache.beam.sdk.transforms.windowing.WindowMappingFn<TargetWindowT>
- All Implemented Interfaces:
Serializable
public abstract class WindowMappingFn<TargetWindowT extends BoundedWindow>
extends Object
implements Serializable
A function that takes the windows of elements in a main input and maps them to the appropriate
window in a
PCollectionView consumed as a side input.- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreate a newWindowMappingFnwithzeromaximum lookback.protectedWindowMappingFn(Duration maximumLookback) Create a newWindowMappingFnwith the specified maximum lookback. -
Method Summary
Modifier and TypeMethodDescriptionabstract TargetWindowTgetSideInputWindow(BoundedWindow mainWindow) Returns the window of the side input corresponding to the given window of the main input.final DurationThe maximum distance between the end of any main input windowmainWindowand the end of the side input window returned bygetSideInputWindow(BoundedWindow)
-
Constructor Details
-
WindowMappingFn
protected WindowMappingFn()Create a newWindowMappingFnwithzeromaximum lookback. -
WindowMappingFn
Create a newWindowMappingFnwith the specified maximum lookback.
-
-
Method Details
-
getSideInputWindow
Returns the window of the side input corresponding to the given window of the main input. -
maximumLookback
The maximum distance between the end of any main input windowmainWindowand the end of the side input window returned bygetSideInputWindow(BoundedWindow)A side input window
wbecomes unreachable when the input watermarks for all consumers surpasses the timestamp:(end of side input window) + (maximum lookback) + (main input allowed lateness).
At this point, every main input window that could map to
wis expired.
-