Interface UnsliceAssigner<W extends Window>
- All Superinterfaces:
Serializable,WindowAssigner
- All Known Implementing Classes:
UnsliceAssigners.SessionUnsliceAssigner,UnsliceAssigners.WindowedUnsliceAssigner
A
UnsliceAssigner assigns each element into a single window and not divides the window
into finite number of non-overlapping slice. Different with SliceAssigner, we use the
Window to identifier a window.
UnsliceAssigner is designed for unaligned Windows like session window.
Because unaligned Windows are windows determined dynamically based on elements, and its window boundaries are determined based on the messages timestamps and their correlations, some windows may be merged into one.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionassignActualWindow(org.apache.flink.table.data.RowData element, ClockService clock, MergingWindowProcessFunction<?, W> windowFunction) Returns theWindowthat the given element should belong to be used to trigger on.assignStateNamespace(org.apache.flink.table.data.RowData element, ClockService clock, MergingWindowProcessFunction<?, W> windowFunction) Returns theWindowthat the given element should belong to be used as a namespace to restore the state.Currently, unslice assigner has an innerMergingWindowAssignerto reuse the logic inGroupWindowAssignerto merge windows.Methods inherited from interface org.apache.flink.table.runtime.operators.window.tvf.common.WindowAssigner
getDescription, isEventTime
-
Method Details
-
assignActualWindow
Optional<W> assignActualWindow(org.apache.flink.table.data.RowData element, ClockService clock, MergingWindowProcessFunction<?, W> windowFunction) throws ExceptionReturns theWindowthat the given element should belong to be used to trigger on.See more details in
MergingWindowProcessFunction.assignActualWindows(org.apache.flink.table.data.RowData, long).- Parameters:
element- the element to which slice should belong to.clock- the service to get current processing time.- Returns:
- if empty, that means the element is late.
- Throws:
Exception
-
assignStateNamespace
Optional<W> assignStateNamespace(org.apache.flink.table.data.RowData element, ClockService clock, MergingWindowProcessFunction<?, W> windowFunction) throws ExceptionReturns theWindowthat the given element should belong to be used as a namespace to restore the state.See more details in
MergingWindowProcessFunction.assignStateNamespace(org.apache.flink.table.data.RowData, long).- Parameters:
element- the element to which slice should belong to.clock- the service to get current processing time.- Returns:
- if empty, that means the element is late.
- Throws:
Exception
-
getMergingWindowAssigner
MergingWindowAssigner<W> getMergingWindowAssigner()Currently, unslice assigner has an innerMergingWindowAssignerto reuse the logic inGroupWindowAssignerto merge windows.
-