Class GlobalWindows
java.lang.Object
org.apache.beam.sdk.transforms.windowing.WindowFn<Object,GlobalWindow>
org.apache.beam.sdk.transforms.windowing.NonMergingWindowFn<Object,GlobalWindow>
org.apache.beam.sdk.transforms.windowing.GlobalWindows
- All Implemented Interfaces:
Serializable
,HasDisplayData
A
WindowFn
that assigns all data to the same window.
This is the WindowFn
used for data coming from a source, before a Window
transform has been applied.
- 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 TypeMethodDescriptionboolean
Returns true if thisWindowFn
always assigns an element to exactly one window.Given a timestamp and element, returns the set of windows into which it should be placed.boolean
Returns the defaultWindowMappingFn
to use to map main input windows to side input windows.int
hashCode()
boolean
isCompatible
(WindowFn<?, ?> o) Returns whether this performs the same merging as the givenWindowFn
.toString()
void
verifyCompatibility
(WindowFn<?, ?> other) ThrowIncompatibleWindowException
if this WindowFn does not perform the same merging as the given $WindowFn
.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
getWindowTypeDescriptor, populateDisplayData
-
Constructor Details
-
GlobalWindows
public GlobalWindows()
-
-
Method Details
-
assignWindows
Description 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,
GlobalWindow>
-
isCompatible
Description copied from class:WindowFn
Returns whether this performs the same merging as the givenWindowFn
.- Specified by:
isCompatible
in classWindowFn<Object,
GlobalWindow>
-
verifyCompatibility
Description copied from class:WindowFn
ThrowIncompatibleWindowException
if this WindowFn does not perform the same merging as the given $WindowFn
.- Overrides:
verifyCompatibility
in classWindowFn<Object,
GlobalWindow> - Throws:
IncompatibleWindowException
- if compared WindowFns are not compatible.
-
windowCoder
Description copied from class:WindowFn
Returns theCoder
used for serializing the windows used by this windowFn.- Specified by:
windowCoder
in classWindowFn<Object,
GlobalWindow>
-
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,
GlobalWindow>
-
assignsToOneWindow
public boolean assignsToOneWindow()Description copied from class:WindowFn
Returns true if thisWindowFn
always assigns an element to exactly one window.If this varies per-element, or cannot be determined, conservatively return false.
By default, returns false.
- Overrides:
assignsToOneWindow
in classWindowFn<Object,
GlobalWindow>
-
equals
-
hashCode
public int hashCode() -
toString
-