public static class UnsliceAssigners.SessionUnsliceAssigner extends Object implements UnsliceAssigner<TimeWindow>
UnsliceAssigner for session windows.| 构造器和说明 |
|---|
SessionUnsliceAssigner(int rowtimeIndex,
ZoneId shiftTimeZone,
long sessionGap) |
| 限定符和类型 | 方法和说明 |
|---|---|
Optional<TimeWindow> |
assignActualWindow(org.apache.flink.table.data.RowData element,
ClockService clock,
MergingWindowProcessFunction<?,TimeWindow> windowFunction)
Returns the
Window that the given element should belong to be used to trigger on. |
Optional<TimeWindow> |
assignStateNamespace(org.apache.flink.table.data.RowData element,
ClockService clock,
MergingWindowProcessFunction<?,TimeWindow> windowFunction)
Returns the
Window that the given element should belong to be used as a namespace to
restore the state. |
String |
getDescription()
Returns a description of this window assigner.
|
MergingWindowAssigner<TimeWindow> |
getMergingWindowAssigner()
Currently, unslice assigner has an inner
MergingWindowAssigner to reuse the logic in
GroupWindowAssigner to
merge windows. |
protected long |
getUtcTimestamp(org.apache.flink.table.data.RowData element,
ClockService clock) |
boolean |
isEventTime()
Returns
true if elements are assigned to windows based on event time, false
based on processing time. |
public SessionUnsliceAssigner(int rowtimeIndex,
ZoneId shiftTimeZone,
long sessionGap)
public MergingWindowAssigner<TimeWindow> getMergingWindowAssigner()
UnsliceAssignerMergingWindowAssigner to reuse the logic in
GroupWindowAssigner to
merge windows.getMergingWindowAssigner 在接口中 UnsliceAssigner<TimeWindow>public Optional<TimeWindow> assignActualWindow(org.apache.flink.table.data.RowData element, ClockService clock, MergingWindowProcessFunction<?,TimeWindow> windowFunction) throws Exception
UnsliceAssignerWindow that the given element should belong to be used to trigger on.
See more details in MergingWindowProcessFunction.assignActualWindows(org.apache.flink.table.data.RowData, long).
assignActualWindow 在接口中 UnsliceAssigner<TimeWindow>element - the element to which slice should belong to.clock - the service to get current processing time.Exceptionpublic Optional<TimeWindow> assignStateNamespace(org.apache.flink.table.data.RowData element, ClockService clock, MergingWindowProcessFunction<?,TimeWindow> windowFunction) throws Exception
UnsliceAssignerWindow that 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).
assignStateNamespace 在接口中 UnsliceAssigner<TimeWindow>element - the element to which slice should belong to.clock - the service to get current processing time.Exceptionprotected long getUtcTimestamp(org.apache.flink.table.data.RowData element,
ClockService clock)
public boolean isEventTime()
WindowAssignertrue if elements are assigned to windows based on event time, false
based on processing time.isEventTime 在接口中 WindowAssignerpublic String getDescription()
WindowAssignergetDescription 在接口中 WindowAssignerCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.