Class SliceAssigners
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.window.slicing.SliceAssigners
-
@Internal public final class SliceAssigners extends Object
Utilities to createSliceAssigners.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSliceAssigners.CumulativeSliceAssignerTheSliceAssignerfor cumulative windows.static classSliceAssigners.HoppingSliceAssignerTheSliceAssignerfor hopping windows.static classSliceAssigners.SlicedSharedSliceAssignerTheSliceAssignerfor elements have been attached slice end timestamp, and the slices are shared.static classSliceAssigners.SlicedUnsharedSliceAssignerTheSliceAssignerfor elements have been attached slice end timestamp, but the slices are not shared, i.e.static classSliceAssigners.TumblingSliceAssignerTheSliceAssignerfor tumbling windows.static classSliceAssigners.WindowedSliceAssignerTheSliceAssignerfor elements have been attached window start and end timestamps.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SliceAssigners.CumulativeSliceAssignercumulative(int rowtimeIndex, java.time.ZoneId shiftTimeZone, java.time.Duration maxSize, java.time.Duration step)Creates a cumulative windowSliceAssignerthat assigns elements to slices of cumulative windows.static SliceAssigners.HoppingSliceAssignerhopping(int rowtimeIndex, java.time.ZoneId shiftTimeZone, java.time.Duration size, java.time.Duration slide)Creates a hopping windowSliceAssignerthat assigns elements to slices of hopping windows.static SliceAssignersliced(int sliceEndIndex, SliceAssigner innerAssigner)Creates aSliceAssignerthat assigns elements which has been attached slice end timestamp.static SliceAssigners.TumblingSliceAssignertumbling(int rowtimeIndex, java.time.ZoneId shiftTimeZone, java.time.Duration size)Creates a tumbling windowSliceAssignerthat assigns elements to slices of tumbling windows.static SliceAssigners.WindowedSliceAssignerwindowed(int windowEndIndex, SliceAssigner innerAssigner)Creates aSliceAssignerthat assigns elements which has been attached window start and window end timestamp to slices.
-
-
-
Method Detail
-
tumbling
public static SliceAssigners.TumblingSliceAssigner tumbling(int rowtimeIndex, java.time.ZoneId shiftTimeZone, java.time.Duration size)
Creates a tumbling windowSliceAssignerthat assigns elements to slices of tumbling windows.- Parameters:
rowtimeIndex- the index of rowtime field in the input row,-1if based on processing time.shiftTimeZone- The shift timezone of the window, if the proctime or rowtime type is TIMESTAMP_LTZ, the shift timezone is the timezone user configured in TableConfig, other cases the timezone is UTC which means never shift when assigning windows.size- the size of the generated windows.
-
hopping
public static SliceAssigners.HoppingSliceAssigner hopping(int rowtimeIndex, java.time.ZoneId shiftTimeZone, java.time.Duration size, java.time.Duration slide)
Creates a hopping windowSliceAssignerthat assigns elements to slices of hopping windows.- Parameters:
rowtimeIndex- the index of rowtime field in the input row,-1if based on * processing time.shiftTimeZone- The shift timezone of the window, if the proctime or rowtime type is TIMESTAMP_LTZ, the shift timezone is the timezone user configured in TableConfig, other cases the timezone is UTC which means never shift when assigning windows.slide- the slide interval of the generated windows.
-
cumulative
public static SliceAssigners.CumulativeSliceAssigner cumulative(int rowtimeIndex, java.time.ZoneId shiftTimeZone, java.time.Duration maxSize, java.time.Duration step)
Creates a cumulative windowSliceAssignerthat assigns elements to slices of cumulative windows.- Parameters:
rowtimeIndex- the index of rowtime field in the input row,-1if based on * processing time.shiftTimeZone- The shift timezone of the window, if the proctime or rowtime type is TIMESTAMP_LTZ, the shift timezone is the timezone user configured in TableConfig, other cases the timezone is UTC which means never shift when assigning windows.step- the step interval of the generated windows.
-
windowed
public static SliceAssigners.WindowedSliceAssigner windowed(int windowEndIndex, SliceAssigner innerAssigner)
Creates aSliceAssignerthat assigns elements which has been attached window start and window end timestamp to slices. The assigned slice is equal to the given window.- Parameters:
windowEndIndex- the index of window end field in the input row, mustn't be a negative value.innerAssigner- the inner assigner which assigns the attached windows
-
sliced
public static SliceAssigner sliced(int sliceEndIndex, SliceAssigner innerAssigner)
Creates aSliceAssignerthat assigns elements which has been attached slice end timestamp.- Parameters:
sliceEndIndex- the index of slice end field in the input row, mustn't be a negative value.innerAssigner- the inner assigner which assigns the attached windows
-
-