public class ProcTimeMiniBatchDeduplicateKeepFirstRowFunction extends MapBundleFunction<K,V,IN,OUT>
The state stores a boolean flag to indicate whether key appears before as an optimization.
Modifier and Type | Field and Description |
---|---|
protected long |
minRetentionTime |
protected ValueState<T> |
state |
protected TypeInformation<T> |
stateType |
ctx
Constructor and Description |
---|
ProcTimeMiniBatchDeduplicateKeepFirstRowFunction(TypeSerializer<RowData> serializer,
long stateRetentionTime) |
Modifier and Type | Method and Description |
---|---|
RowData |
addInput(RowData value,
RowData input)
Adds the given input to the given value, returning the new bundle value.
|
void |
finishBundle(Map<RowData,RowData> buffer,
Collector<RowData> out)
Called when a bundle is finished.
|
void |
open(ExecutionContext ctx) |
close
protected final TypeInformation<T> stateType
protected final long minRetentionTime
protected ValueState<T> state
public ProcTimeMiniBatchDeduplicateKeepFirstRowFunction(TypeSerializer<RowData> serializer, long stateRetentionTime)
public RowData addInput(@Nullable RowData value, RowData input)
MapBundleFunction
public void finishBundle(Map<RowData,RowData> buffer, Collector<RowData> out) throws Exception
MapBundleFunction
finishBundle
in class MapBundleFunction<RowData,RowData,RowData,RowData>
Exception
public void open(ExecutionContext ctx) throws Exception
open
in class MapBundleFunction<K,V,IN,OUT>
Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.