Class GlobalAggCombiner
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.aggregate.window.combines.GlobalAggCombiner
-
- All Implemented Interfaces:
RecordsCombiner
public class GlobalAggCombiner extends Object implements RecordsCombiner
An implementation ofRecordsCombinerthat accumulates local accumulators records into the window accumulator state.Note: this only supports event-time window.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGlobalAggCombiner.FactoryFactory to createGlobalAggCombiner.-
Nested classes/interfaces inherited from interface org.apache.flink.table.runtime.operators.window.combines.RecordsCombiner
RecordsCombiner.LocalFactory
-
-
Constructor Summary
Constructors Constructor Description GlobalAggCombiner(WindowTimerService<Long> timerService, StateKeyContext keyContext, WindowValueState<Long> accState, NamespaceAggsHandleFunction<Long> localAggregator, NamespaceAggsHandleFunction<Long> globalAggregator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Release resources allocated by this combine function.voidcombine(WindowKey windowKey, Iterator<org.apache.flink.table.data.RowData> localAccs)Combines the buffered data into state based on the given window-key pair.
-
-
-
Constructor Detail
-
GlobalAggCombiner
public GlobalAggCombiner(WindowTimerService<Long> timerService, StateKeyContext keyContext, WindowValueState<Long> accState, NamespaceAggsHandleFunction<Long> localAggregator, NamespaceAggsHandleFunction<Long> globalAggregator)
-
-
Method Detail
-
combine
public void combine(WindowKey windowKey, Iterator<org.apache.flink.table.data.RowData> localAccs) throws Exception
Description copied from interface:RecordsCombinerCombines the buffered data into state based on the given window-key pair.- Specified by:
combinein interfaceRecordsCombiner- Parameters:
windowKey- the window-key pair that the buffered data belong to, the window-key object is reused.localAccs- the buffered data, the iterator andRowDataobjects are reused.- Throws:
Exception
-
close
public void close() throws ExceptionDescription copied from interface:RecordsCombinerRelease resources allocated by this combine function.- Specified by:
closein interfaceRecordsCombiner- Throws:
Exception
-
-