Class TVFSlidingWindowFn
java.lang.Object
org.apache.beam.sdk.transforms.windowing.WindowFn<Object,IntervalWindow>
org.apache.beam.sdk.transforms.windowing.NonMergingWindowFn<Object,IntervalWindow>
org.apache.beam.sdk.extensions.sql.impl.TVFSlidingWindowFn
- All Implemented Interfaces:
Serializable,HasDisplayData
TVFSlidingWindowFn assigns window based on input row's "window_start" and "window_end"
timestamps.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.beam.sdk.transforms.windowing.WindowFn
WindowFn.AssignContext, WindowFn.MergeContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGiven a timestamp and element, returns the set of windows into which it should be placed.Returns the defaultWindowMappingFnto use to map main input windows to side input windows.abstract DurationAmount of time between generated windows.abstract DurationgetSize()Size of the generated windows.booleanisCompatible(WindowFn<?, ?> other) Returns whether this performs the same merging as the givenWindowFn.static TVFSlidingWindowFnReturns theCoderused for serializing the windows used by this windowFn.Methods inherited from class org.apache.beam.sdk.transforms.windowing.NonMergingWindowFn
isNonMerging, mergeWindowsMethods inherited from class org.apache.beam.sdk.transforms.windowing.WindowFn
assignsToOneWindow, getWindowTypeDescriptor, populateDisplayData, verifyCompatibility
-
Constructor Details
-
TVFSlidingWindowFn
public TVFSlidingWindowFn()
-
-
Method Details
-
getSize
Size of the generated windows. -
getPeriod
Amount of time between generated windows. -
of
-
assignWindows
public Collection<IntervalWindow> assignWindows(WindowFn<Object, IntervalWindow>.AssignContext c) throws ExceptionDescription copied from class:WindowFnGiven a timestamp and element, returns the set of windows into which it should be placed.- Specified by:
assignWindowsin classWindowFn<Object,IntervalWindow> - Throws:
Exception
-
isCompatible
Description copied from class:WindowFnReturns whether this performs the same merging as the givenWindowFn.- Specified by:
isCompatiblein classWindowFn<Object,IntervalWindow>
-
windowCoder
Description copied from class:WindowFnReturns theCoderused for serializing the windows used by this windowFn.- Specified by:
windowCoderin classWindowFn<Object,IntervalWindow>
-
getDefaultWindowMappingFn
Description copied from class:WindowFnReturns the defaultWindowMappingFnto use to map main input windows to side input windows. This should accept arbitrary main input windows, and produce aBoundedWindowthat can be produced by thisWindowFn.- Specified by:
getDefaultWindowMappingFnin classWindowFn<Object,IntervalWindow>
-