Class WindowMappingFn<TargetWindowT extends BoundedWindow>
- java.lang.Object
-
- org.apache.beam.sdk.transforms.windowing.WindowMappingFn<TargetWindowT>
-
- All Implemented Interfaces:
java.io.Serializable
@Experimental public abstract class WindowMappingFn<TargetWindowT extends BoundedWindow> extends java.lang.Object implements java.io.Serializable
Experimental! This will be ready for users eventually, but should be considered internal for now. No backwards compatibility guarantees.A function that takes the windows of elements in a main input and maps them to the appropriate window in a
PCollectionView
consumed as aside input
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
WindowMappingFn()
Create a newWindowMappingFn
withzero
maximum lookback.protected
WindowMappingFn(org.joda.time.Duration maximumLookback)
Create a newWindowMappingFn
with the specified maximum lookback.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract TargetWindowT
getSideInputWindow(BoundedWindow mainWindow)
Returns the window of the side input corresponding to the given window of the main input.org.joda.time.Duration
maximumLookback()
The maximum distance between the end of any main input windowmainWindow
and the end of the side input window returned bygetSideInputWindow(BoundedWindow)
-
-
-
Constructor Detail
-
WindowMappingFn
protected WindowMappingFn()
Create a newWindowMappingFn
withzero
maximum lookback.
-
WindowMappingFn
protected WindowMappingFn(org.joda.time.Duration maximumLookback)
Create a newWindowMappingFn
with the specified maximum lookback.
-
-
Method Detail
-
getSideInputWindow
public abstract TargetWindowT getSideInputWindow(BoundedWindow mainWindow)
Returns the window of the side input corresponding to the given window of the main input.
-
maximumLookback
public final org.joda.time.Duration maximumLookback()
The maximum distance between the end of any main input windowmainWindow
and the end of the side input window returned bygetSideInputWindow(BoundedWindow)
A side input window
w
becomes 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
w
is expired.
-
-