Interface SliceAssigner
-
- All Superinterfaces:
Serializable
,WindowAssigner
- All Known Subinterfaces:
SliceSharedAssigner
,SliceUnsharedAssigner
- All Known Implementing Classes:
SliceAssigners.CumulativeSliceAssigner
,SliceAssigners.HoppingSliceAssigner
,SliceAssigners.SlicedSharedSliceAssigner
,SliceAssigners.SlicedUnsharedSliceAssigner
,SliceAssigners.TumblingSliceAssigner
,SliceAssigners.WindowedSliceAssigner
@Internal public interface SliceAssigner extends WindowAssigner
ASliceAssigner
assigns element into a single slice. Note that we use the slice end timestamp to identify a slice.Note:
SliceAssigner
servers as a base interface. Concrete assigners should implement interfaceSliceSharedAssigner
orSliceUnsharedAssigner
.- See Also:
for more definition of slice.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
assignSliceEnd(RowData element, ClockService clock)
Returns the end timestamp of a slice that the given element should belong.Iterable<Long>
expiredSlices(long windowEnd)
Returns an iterator of slices to expire when the given window is emitted.long
getLastWindowEnd(long sliceEnd)
Returns the last window which the slice belongs to.long
getSliceEndInterval()
Returns the interval of slice ends, i.e. the step size to advance of the slice end when a new slice assigned.long
getWindowStart(long windowEnd)
Returns the corresponding window start timestamp of the given window end timestamp.-
Methods inherited from interface org.apache.flink.table.runtime.operators.window.tvf.common.WindowAssigner
getDescription, isEventTime
-
-
-
-
Method Detail
-
assignSliceEnd
long assignSliceEnd(RowData element, ClockService clock)
Returns the end timestamp of a slice that the given element should belong.- Parameters:
element
- the element to which slice should belong to.clock
- the service to get current processing time.
-
getLastWindowEnd
long getLastWindowEnd(long sliceEnd)
Returns the last window which the slice belongs to. The window and slices are both identified by the end timestamp.
-
getWindowStart
long getWindowStart(long windowEnd)
Returns the corresponding window start timestamp of the given window end timestamp.
-
expiredSlices
Iterable<Long> expiredSlices(long windowEnd)
Returns an iterator of slices to expire when the given window is emitted. The window and slices are both identified by the end timestamp.- Parameters:
windowEnd
- the end timestamp of window emitted.
-
getSliceEndInterval
long getSliceEndInterval()
Returns the interval of slice ends, i.e. the step size to advance of the slice end when a new slice assigned.
-
-