public class AppendOnlyFirstNFunction extends AbstractTopNFunction
AppendOnlyTopNFunction to handle first-n case.
The input stream should only contain INSERT messages.
hitCount, inputRowType, keyContext, outputRankNumber, rankEnd, requestCount, sortKeyComparator, sortKeySelector, ttlConfig| Constructor and Description |
|---|
AppendOnlyFirstNFunction(org.apache.flink.api.common.state.StateTtlConfig ttlConfig,
InternalTypeInfo<org.apache.flink.table.data.RowData> inputRowType,
GeneratedRecordComparator sortKeyGeneratedRecordComparator,
RowDataKeySelector sortKeySelector,
RankType rankType,
RankRange rankRange,
boolean generateUpdateBefore,
boolean outputRankNumber) |
| Modifier and Type | Method and Description |
|---|---|
void |
open(org.apache.flink.api.common.functions.OpenContext openContext) |
void |
processElement(org.apache.flink.table.data.RowData input,
org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context context,
org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) |
checkSortKeyInBufferRange, collectDelete, collectDelete, collectInsert, collectInsert, collectUpdateAfter, collectUpdateAfter, collectUpdateBefore, collectUpdateBefore, getDefaultTopNSize, hasOffset, initRankEnd, isInRankEnd, isInRankRange, registerMetric, setKeyContextpublic AppendOnlyFirstNFunction(org.apache.flink.api.common.state.StateTtlConfig ttlConfig,
InternalTypeInfo<org.apache.flink.table.data.RowData> inputRowType,
GeneratedRecordComparator sortKeyGeneratedRecordComparator,
RowDataKeySelector sortKeySelector,
RankType rankType,
RankRange rankRange,
boolean generateUpdateBefore,
boolean outputRankNumber)
public void open(org.apache.flink.api.common.functions.OpenContext openContext)
throws Exception
open in interface org.apache.flink.api.common.functions.RichFunctionopen in class AbstractTopNFunctionExceptionpublic void processElement(org.apache.flink.table.data.RowData input,
org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context context,
org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)
throws Exception
processElement in class org.apache.flink.streaming.api.functions.KeyedProcessFunction<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>ExceptionCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.