Class RowTimeMiniBatchDeduplicateFunction
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.bundle.MapBundleFunction<K,V,IN,OUT>
-
- org.apache.flink.table.runtime.operators.deduplicate.RowTimeMiniBatchDeduplicateFunction
-
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function
public class RowTimeMiniBatchDeduplicateFunction extends MapBundleFunction<K,V,IN,OUT>
This function is used to get the first or last row for every key partition in miniBatch mode.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected longminRetentionTimeprotected org.apache.flink.api.common.state.ValueState<T>stateprotected org.apache.flink.api.common.typeinfo.TypeInformation<T>stateType-
Fields inherited from class org.apache.flink.table.runtime.operators.bundle.MapBundleFunction
ctx
-
-
Constructor Summary
Constructors Constructor Description RowTimeMiniBatchDeduplicateFunction(InternalTypeInfo<org.apache.flink.table.data.RowData> typeInfo, org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> serializer, long minRetentionTime, int rowtimeIndex, boolean generateUpdateBefore, boolean generateInsert, boolean keepLastRow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.apache.flink.table.data.RowData>addInput(List<org.apache.flink.table.data.RowData> value, org.apache.flink.table.data.RowData input)Adds the given input to the given value, returning the new bundle value.voidfinishBundle(Map<org.apache.flink.table.data.RowData,List<org.apache.flink.table.data.RowData>> buffer, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)Called when a bundle is finished.voidopen(ExecutionContext ctx)-
Methods inherited from class org.apache.flink.table.runtime.operators.bundle.MapBundleFunction
close
-
-
-
-
Constructor Detail
-
RowTimeMiniBatchDeduplicateFunction
public RowTimeMiniBatchDeduplicateFunction(InternalTypeInfo<org.apache.flink.table.data.RowData> typeInfo, org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> serializer, long minRetentionTime, int rowtimeIndex, boolean generateUpdateBefore, boolean generateInsert, boolean keepLastRow)
-
-
Method Detail
-
addInput
public List<org.apache.flink.table.data.RowData> addInput(@Nullable List<org.apache.flink.table.data.RowData> value, org.apache.flink.table.data.RowData input) throws Exception
Description copied from class:MapBundleFunctionAdds the given input to the given value, returning the new bundle value.- Specified by:
addInputin classMapBundleFunction<org.apache.flink.table.data.RowData,List<org.apache.flink.table.data.RowData>,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>- Parameters:
value- the existing bundle value, maybe nullinput- the given input, not null- Throws:
Exception
-
finishBundle
public void finishBundle(Map<org.apache.flink.table.data.RowData,List<org.apache.flink.table.data.RowData>> buffer, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) throws Exception
Description copied from class:MapBundleFunctionCalled when a bundle is finished. Transform a bundle to zero, one, or more output elements.- Specified by:
finishBundlein classMapBundleFunction<org.apache.flink.table.data.RowData,List<org.apache.flink.table.data.RowData>,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>- Throws:
Exception
-
open
public void open(ExecutionContext ctx) throws Exception
- Overrides:
openin classMapBundleFunction<K,V,IN,OUT>- Throws:
Exception
-
-