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
This function is used to get the first or last row for every key partition in miniBatch mode.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final longprotected org.apache.flink.api.common.state.ValueState<org.apache.flink.table.data.RowData>protected final org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData>Fields inherited from class org.apache.flink.table.runtime.operators.bundle.MapBundleFunction
ctx -
Constructor Summary
ConstructorsConstructorDescriptionRowTimeMiniBatchDeduplicateFunction(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
Modifier and TypeMethodDescriptionList<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
-
Field Details
-
stateType
protected final org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> stateType -
minRetentionTime
protected final long minRetentionTime -
state
protected org.apache.flink.api.common.state.ValueState<org.apache.flink.table.data.RowData> state
-
-
Constructor Details
-
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 Details
-
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 ExceptionDescription 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
- Overrides:
openin classMapBundleFunction<K,V, IN, OUT> - Throws:
Exception
-