Class CalendarWindows.MonthsWindows
- All Implemented Interfaces:
Serializable,HasDisplayData
- Enclosing class:
CalendarWindows
WindowFn that windows elements into periods measured by months.
By default, periods of multiple months are measured starting at the epoch. This can be
overridden with withStartingMonth(int, int).
Months start on the first day of each calendar month, unless overridden by beginningOnDay(int).
The time zone used to determine calendar boundaries is UTC, unless this is overridden with
the withTimeZone(org.joda.time.DateTimeZone) method.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.beam.sdk.transforms.windowing.WindowFn
WindowFn.AssignContext, WindowFn.MergeContext -
Method Summary
Modifier and TypeMethodDescriptionassignWindow(Instant timestamp) Returns the single window to which elements with this timestamp belong.beginningOnDay(int dayOfMonth) intintbooleanisCompatible(WindowFn<?, ?> other) Returns whether this performs the same merging as the givenWindowFn.voidpopulateDisplayData(DisplayData.Builder builder) Register display data for the given transform or component.voidverifyCompatibility(WindowFn<?, ?> other) ThrowIncompatibleWindowExceptionif this WindowFn does not perform the same merging as the given $WindowFn.Returns theCoderused for serializing the windows used by this windowFn.withStartingMonth(int year, int month) withTimeZone(DateTimeZone timeZone) Methods inherited from class org.apache.beam.sdk.transforms.windowing.PartitioningWindowFn
assignsToOneWindow, assignWindows, getDefaultWindowMappingFnMethods inherited from class org.apache.beam.sdk.transforms.windowing.NonMergingWindowFn
isNonMerging, mergeWindowsMethods inherited from class org.apache.beam.sdk.transforms.windowing.WindowFn
getWindowTypeDescriptor
-
Method Details
-
beginningOnDay
-
withStartingMonth
-
withTimeZone
-
assignWindow
Description copied from class:PartitioningWindowFnReturns the single window to which elements with this timestamp belong.- Specified by:
assignWindowin classPartitioningWindowFn<Object,IntervalWindow>
-
windowCoder
Description copied from class:WindowFnReturns theCoderused for serializing the windows used by this windowFn.- Specified by:
windowCoderin classWindowFn<Object,IntervalWindow>
-
isCompatible
Description copied from class:WindowFnReturns whether this performs the same merging as the givenWindowFn.- Specified by:
isCompatiblein classWindowFn<Object,IntervalWindow>
-
verifyCompatibility
Description copied from class:WindowFnThrowIncompatibleWindowExceptionif this WindowFn does not perform the same merging as the given $WindowFn.- Overrides:
verifyCompatibilityin classWindowFn<Object,IntervalWindow> - Throws:
IncompatibleWindowException- if compared WindowFns are not compatible.
-
populateDisplayData
Description copied from class:WindowFnRegister display data for the given transform or component.populateDisplayData(DisplayData.Builder)is invoked by Pipeline runners to collect display data viaDisplayData.from(HasDisplayData). Implementations may callsuper.populateDisplayData(builder)in order to register display data in the current namespace, but should otherwise usesubcomponent.populateDisplayData(builder)to use the namespace of the subcomponent.By default, does not register any display data. Implementors may override this method to provide their own display data.
- Specified by:
populateDisplayDatain interfaceHasDisplayData- Overrides:
populateDisplayDatain classWindowFn<Object,IntervalWindow> - Parameters:
builder- The builder to populate with display data.- See Also:
-
getNumber
public int getNumber() -
getDayOfMonth
public int getDayOfMonth() -
getStartDate
-
getTimeZone
-