public class GlobalAggCombiner extends Object implements RecordsCombiner
RecordsCombiner
that accumulates local accumulators records into the
window accumulator state.
Note: this only supports event-time window.
Modifier and Type | Class and Description |
---|---|
static class |
GlobalAggCombiner.Factory
Factory to create
GlobalAggCombiner . |
RecordsCombiner.LocalFactory
Constructor and Description |
---|
GlobalAggCombiner(WindowTimerService<Long> timerService,
StateKeyContext keyContext,
WindowValueState<Long> accState,
NamespaceAggsHandleFunction<Long> localAggregator,
NamespaceAggsHandleFunction<Long> globalAggregator) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Release resources allocated by this combine function.
|
void |
combine(WindowKey windowKey,
Iterator<RowData> localAccs)
Combines the buffered data into state based on the given window-key pair.
|
public GlobalAggCombiner(WindowTimerService<Long> timerService, StateKeyContext keyContext, WindowValueState<Long> accState, NamespaceAggsHandleFunction<Long> localAggregator, NamespaceAggsHandleFunction<Long> globalAggregator)
public void combine(WindowKey windowKey, Iterator<RowData> localAccs) throws Exception
RecordsCombiner
combine
in interface RecordsCombiner
windowKey
- the window-key pair that the buffered data belong to, the window-key object
is reused.localAccs
- the buffered data, the iterator and RowData
objects are reused.Exception
public void close() throws Exception
RecordsCombiner
close
in interface RecordsCombiner
Exception
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.