public class RetractableTopNFunction extends AbstractTopNFunction
Input stream can contain any change kind: INSERT, DELETE, UPDATE_BEFORE and UPDATE_AFTER.
hitCount, inputRowType, keyContext, outputRankNumber, rankEnd, requestCount, sortKeyComparator, sortKeySelectorstateCleaningEnabled| Constructor and Description |
|---|
RetractableTopNFunction(long minRetentionTime,
long maxRetentionTime,
RowDataTypeInfo inputRowType,
GeneratedRecordComparator generatedRecordComparator,
RowDataKeySelector sortKeySelector,
RankType rankType,
RankRange rankRange,
GeneratedRecordEqualiser generatedEqualiser,
boolean generateUpdateBefore,
boolean outputRankNumber) |
| Modifier and Type | Method and Description |
|---|---|
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) |
void |
open(org.apache.flink.configuration.Configuration parameters) |
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) |
checkSortKeyInBufferRange, collectDelete, collectDelete, collectInsert, collectInsert, collectUpdateAfter, collectUpdateAfter, collectUpdateBefore, collectUpdateBefore, getDefaultTopNSize, hasOffset, initRankEnd, isInRankEnd, isInRankRange, registerMetric, setKeyContextcleanupState, initCleanupTimeState, isProcessingTimeTimer, needToCleanupState, registerProcessingCleanupTimerclose, getIterationRuntimeContext, getRuntimeContext, setRuntimeContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitregisterProcessingCleanupTimerpublic RetractableTopNFunction(long minRetentionTime,
long maxRetentionTime,
RowDataTypeInfo inputRowType,
GeneratedRecordComparator generatedRecordComparator,
RowDataKeySelector sortKeySelector,
RankType rankType,
RankRange rankRange,
GeneratedRecordEqualiser generatedEqualiser,
boolean generateUpdateBefore,
boolean outputRankNumber)
public void open(org.apache.flink.configuration.Configuration parameters)
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 ctx,
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>Exceptionpublic 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
onTimer 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–2020 The Apache Software Foundation. All rights reserved.