Class RowTimeDeduplicateFunction
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.operators.deduplicate.DeduplicateFunctionBase<T,K,IN,OUT>
org.apache.flink.table.runtime.operators.deduplicate.RowTimeDeduplicateFunction
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.RichFunction
This function is used to deduplicate on keys and keeps only first or last row on row time.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.flink.streaming.api.functions.KeyedProcessFunction
org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context, org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.flink.api.common.state.ValueState<org.apache.flink.table.data.RowData>Fields inherited from class org.apache.flink.table.runtime.operators.deduplicate.DeduplicateFunctionBase
serializer, stateRetentionTime, typeInfo -
Constructor Summary
ConstructorsConstructorDescriptionRowTimeDeduplicateFunction(InternalTypeInfo<org.apache.flink.table.data.RowData> typeInfo, long minRetentionTime, int rowtimeIndex, boolean generateUpdateBefore, boolean generateInsert, boolean keepLastRow) -
Method Summary
Modifier and TypeMethodDescriptionvoidopen(org.apache.flink.api.common.functions.OpenContext openContext) voidprocessElement(org.apache.flink.table.data.RowData input, 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.streaming.api.functions.KeyedProcessFunction.Context ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) Methods inherited from class org.apache.flink.streaming.api.functions.KeyedProcessFunction
onTimerMethods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
close, getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
-
Field Details
-
state
protected org.apache.flink.api.common.state.ValueState<org.apache.flink.table.data.RowData> state
-
-
Constructor Details
-
RowTimeDeduplicateFunction
public RowTimeDeduplicateFunction(InternalTypeInfo<org.apache.flink.table.data.RowData> typeInfo, long minRetentionTime, int rowtimeIndex, boolean generateUpdateBefore, boolean generateInsert, boolean keepLastRow)
-
-
Method Details
-
open
- Specified by:
openin interfaceorg.apache.flink.api.common.functions.RichFunction- Throws:
Exception
-
processElement
public void processElement(org.apache.flink.table.data.RowData input, org.apache.flink.streaming.api.functions.KeyedProcessFunction<org.apache.flink.table.data.RowData, org.apache.flink.table.data.RowData, throws Exceptionorg.apache.flink.table.data.RowData>.org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) - 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
-