public static class CalendarWindows.MonthsWindows extends PartitioningWindowFn<Object,IntervalWindow>
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.
WindowFn.AssignContext, WindowFn.MergeContext| Modifier and Type | Method and Description |
|---|---|
IntervalWindow |
assignWindow(org.joda.time.Instant timestamp)
Returns the single window to which elements with this timestamp belong.
|
CalendarWindows.MonthsWindows |
beginningOnDay(int dayOfMonth) |
int |
getDayOfMonth() |
int |
getNumber() |
org.joda.time.DateTime |
getStartDate() |
org.joda.time.DateTimeZone |
getTimeZone() |
boolean |
isCompatible(WindowFn other)
Returns whether this performs the same merging as the given
WindowFn. |
Coder<IntervalWindow> |
windowCoder()
Returns the
Coder used for serializing the windows used
by this windowFn. |
CalendarWindows.MonthsWindows |
withStartingMonth(int year,
int month) |
CalendarWindows.MonthsWindows |
withTimeZone(org.joda.time.DateTimeZone timeZone) |
assignsToSingleWindow, assignWindows, getOutputTime, getSideInputWindowisNonMerging, mergeWindowspublic CalendarWindows.MonthsWindows beginningOnDay(int dayOfMonth)
public CalendarWindows.MonthsWindows withStartingMonth(int year, int month)
public CalendarWindows.MonthsWindows withTimeZone(org.joda.time.DateTimeZone timeZone)
public IntervalWindow assignWindow(org.joda.time.Instant timestamp)
PartitioningWindowFnassignWindow in class PartitioningWindowFn<Object,IntervalWindow>public Coder<IntervalWindow> windowCoder()
WindowFnCoder used for serializing the windows used
by this windowFn.windowCoder in class WindowFn<Object,IntervalWindow>public boolean isCompatible(WindowFn other)
WindowFnWindowFn.isCompatible in class WindowFn<Object,IntervalWindow>public int getNumber()
public int getDayOfMonth()
public org.joda.time.DateTime getStartDate()
public org.joda.time.DateTimeZone getTimeZone()