Class AbstractRowTimeUnboundedPrecedingOver<K>
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.streaming.api.functions.KeyedProcessFunction<K,IN,OUT>
-
- org.apache.flink.table.runtime.functions.KeyedProcessFunctionWithCleanupState<K,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
-
- org.apache.flink.table.runtime.operators.over.AbstractRowTimeUnboundedPrecedingOver<K>
-
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.RichFunction,CleanupState
- Direct Known Subclasses:
RowTimeRangeUnboundedPrecedingFunction,RowTimeRowsUnboundedPrecedingFunction
public abstract class AbstractRowTimeUnboundedPrecedingOver<K> extends KeyedProcessFunctionWithCleanupState<K,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
A basic implementation to support unbounded event-time over-window.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AggsHandleFunctionfunctionprotected org.apache.flink.table.data.utils.JoinedRowDataoutput-
Fields inherited from class org.apache.flink.table.runtime.functions.KeyedProcessFunctionWithCleanupState
stateCleaningEnabled
-
-
Constructor Summary
Constructors Constructor Description AbstractRowTimeUnboundedPrecedingOver(long minRetentionTime, long maxRetentionTime, GeneratedAggsHandleFunction genAggsHandler, org.apache.flink.table.types.logical.LogicalType[] accTypes, org.apache.flink.table.types.logical.LogicalType[] inputFieldTypes, int rowTimeIdx)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()protected org.apache.flink.metrics.CountergetCounter()voidonTimer(long timestamp, org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)voidopen(org.apache.flink.api.common.functions.OpenContext openContext)voidprocessElement(org.apache.flink.table.data.RowData input, org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)Puts an element from the input stream into state if it is not late.protected abstract voidprocessElementsWithSameTimestamp(List<org.apache.flink.table.data.RowData> curRowList, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)Process the same timestamp datas, the mechanism is different between rows and range window.-
Methods inherited from class org.apache.flink.table.runtime.functions.KeyedProcessFunctionWithCleanupState
cleanupState, initCleanupTimeState, isProcessingTimeTimer, needToCleanupState, registerProcessingCleanupTimer
-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.table.runtime.functions.CleanupState
registerProcessingCleanupTimer
-
-
-
-
Field Detail
-
output
protected transient org.apache.flink.table.data.utils.JoinedRowData output
-
function
protected transient AggsHandleFunction function
-
-
Constructor Detail
-
AbstractRowTimeUnboundedPrecedingOver
public AbstractRowTimeUnboundedPrecedingOver(long minRetentionTime, long maxRetentionTime, GeneratedAggsHandleFunction genAggsHandler, org.apache.flink.table.types.logical.LogicalType[] accTypes, org.apache.flink.table.types.logical.LogicalType[] inputFieldTypes, int rowTimeIdx)
-
-
Method Detail
-
getCounter
@VisibleForTesting protected org.apache.flink.metrics.Counter getCounter()
-
open
public void open(org.apache.flink.api.common.functions.OpenContext openContext) throws Exception- Throws:
Exception
-
processElement
public void processElement(org.apache.flink.table.data.RowData input, org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) throws ExceptionPuts an element from the input stream into state if it is not late. Registers a timer for the next watermark.- Specified by:
processElementin classorg.apache.flink.streaming.api.functions.KeyedProcessFunction<K,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>- Parameters:
input- The input value.ctx- AKeyedProcessFunction.Contextthat allows querying the timestamp of the element and getting TimerService for registering timers and querying the time. The context is only valid during the invocation of this method, do not store it.out- The collector for returning result values.- Throws:
Exception
-
onTimer
public void onTimer(long timestamp, org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) throws Exception
-
processElementsWithSameTimestamp
protected abstract void processElementsWithSameTimestamp(List<org.apache.flink.table.data.RowData> curRowList, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) throws Exception
Process the same timestamp datas, the mechanism is different between rows and range window.- Throws:
Exception
-
-