类 WatermarkTimeEvictionPolicy<T>
java.lang.Object
org.apache.pulsar.functions.windowing.evictors.TimeEvictionPolicy<T>
org.apache.pulsar.functions.windowing.evictors.WatermarkTimeEvictionPolicy<T>
- 所有已实现的接口:
EvictionPolicy<T,EvictionContext>
An eviction policy that evicts events based on time duration taking
watermark time and event lag into account.
-
嵌套类概要
从接口继承的嵌套类/接口 org.apache.pulsar.functions.windowing.EvictionPolicy
EvictionPolicy.Action -
字段概要
从类继承的字段 org.apache.pulsar.functions.windowing.evictors.TimeEvictionPolicy
evictionContext -
构造器概要
构造器构造器说明WatermarkTimeEvictionPolicy(long windowLength) Constructs a WatermarkTimeEvictionPolicy that evicts events older than the given window length in millis.WatermarkTimeEvictionPolicy(long windowLength, long lag) Constructs a WatermarkTimeEvictionPolicy that evicts events older than the given window length in millis. -
方法概要
从类继承的方法 org.apache.pulsar.functions.windowing.evictors.TimeEvictionPolicy
getContext, getState, reset, restoreState, setContext, track
-
构造器详细资料
-
WatermarkTimeEvictionPolicy
public WatermarkTimeEvictionPolicy(long windowLength) Constructs a WatermarkTimeEvictionPolicy that evicts events older than the given window length in millis.- 参数:
windowLength- the window length in milliseconds
-
WatermarkTimeEvictionPolicy
public WatermarkTimeEvictionPolicy(long windowLength, long lag) Constructs a WatermarkTimeEvictionPolicy that evicts events older than the given window length in millis. The lag parameter can be used in the case of event based ts to break the queue scan early.- 参数:
windowLength- the window length in millisecondslag- the max event lag in milliseconds
-
-
方法详细资料
-
evict
Decides if an event should be expired from the window, processed in the current window or kept for later processing. Keeps events with future ts in the queue for processing in the next window. If the ts difference is more than the lag, stops scanning the queue for the current window.- 指定者:
evict在接口中EvictionPolicy<T,EvictionContext> - 覆盖:
evict在类中TimeEvictionPolicy<T>- 参数:
event- the input event- 返回:
- the
EvictionPolicy.Actionto be taken based on the input event
-
toString
- 覆盖:
toString在类中TimeEvictionPolicy<T>
-