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 defaultWindowMappingFn
to use to map main input windows to side input windows.abstract Duration
Amount of time between generated windows.abstract Duration
getSize()
Size of the generated windows.boolean
isCompatible
(WindowFn<?, ?> other) Returns whether this performs the same merging as the givenWindowFn
.static TVFSlidingWindowFn
Returns theCoder
used for serializing the windows used by this windowFn.Methods inherited from class org.apache.beam.sdk.transforms.windowing.NonMergingWindowFn
isNonMerging, mergeWindows
Methods 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:WindowFn
Given a timestamp and element, returns the set of windows into which it should be placed.- Specified by:
assignWindows
in classWindowFn<Object,
IntervalWindow> - Throws:
Exception
-
isCompatible
Description copied from class:WindowFn
Returns whether this performs the same merging as the givenWindowFn
.- Specified by:
isCompatible
in classWindowFn<Object,
IntervalWindow>
-
windowCoder
Description copied from class:WindowFn
Returns theCoder
used for serializing the windows used by this windowFn.- Specified by:
windowCoder
in classWindowFn<Object,
IntervalWindow>
-
getDefaultWindowMappingFn
Description copied from class:WindowFn
Returns the defaultWindowMappingFn
to use to map main input windows to side input windows. This should accept arbitrary main input windows, and produce aBoundedWindow
that can be produced by thisWindowFn
.- Specified by:
getDefaultWindowMappingFn
in classWindowFn<Object,
IntervalWindow>
-