Class AsyncStateAppendOnlyTopNFunction
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- 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>
-
- org.apache.flink.table.runtime.operators.rank.AbstractTopNFunction
-
- org.apache.flink.table.runtime.operators.rank.async.AbstractAsyncStateTopNFunction
-
- org.apache.flink.table.runtime.operators.rank.async.AsyncStateAppendOnlyTopNFunction
-
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.RichFunction
public class AsyncStateAppendOnlyTopNFunction extends AbstractAsyncStateTopNFunction
A TopN function could handle insert-only stream.The input stream should only contain INSERT messages.
Different with
AppendOnlyTopNFunction, this function is used with async state api.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.table.runtime.operators.rank.AbstractTopNFunction
AbstractTopNFunction.AbstractTopNHelper
-
-
Field Summary
-
Fields inherited from class org.apache.flink.table.runtime.operators.rank.AbstractTopNFunction
constantRankEnd, hitCount, inputRowType, invalidCounter, isConstantRankEnd, keyContext, outputRankNumber, rankEndFetcher, rankStart, requestCount, sortKeyComparator, sortKeySelector, ttlConfig
-
-
Constructor Summary
Constructors Constructor Description AsyncStateAppendOnlyTopNFunction(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, long cacheSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 context, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)-
Methods inherited from class org.apache.flink.table.runtime.operators.rank.async.AbstractAsyncStateTopNFunction
initRankEnd
-
Methods inherited from class org.apache.flink.table.runtime.operators.rank.AbstractTopNFunction
checkSortKeyInBufferRange, collectDelete, collectDelete, collectInsert, collectInsert, collectUpdateAfter, collectUpdateAfter, collectUpdateBefore, collectUpdateBefore, getDefaultTopNSize, hasOffset, isInRankRange, registerMetric, registerMetric, setKeyContext
-
-
-
-
Constructor Detail
-
AsyncStateAppendOnlyTopNFunction
public AsyncStateAppendOnlyTopNFunction(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, long cacheSize)
-
-
Method Detail
-
open
public void open(org.apache.flink.api.common.functions.OpenContext openContext) throws Exception- Specified by:
openin interfaceorg.apache.flink.api.common.functions.RichFunction- Overrides:
openin classAbstractAsyncStateTopNFunction- Throws:
Exception
-
processElement
public 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- Specified by:
processElementin classorg.apache.flink.streaming.api.functions.KeyedProcessFunction<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>- Throws:
Exception
-
-