Class ParallelCombiner<KeyType>
- java.lang.Object
-
- org.apache.druid.query.groupby.epinephelinae.ParallelCombiner<KeyType>
-
public class ParallelCombiner<KeyType> extends Object
ParallelCombiner builds a combining tree which asynchronously aggregates input entries. Each node of the combining tree is a combining task executed in parallel which aggregates inputs from the child nodes.
-
-
Constructor Summary
Constructors Constructor Description ParallelCombiner(ReferenceCountingResourceHolder<ByteBuffer> combineBufferHolder, AggregatorFactory[] combiningFactories, Grouper.KeySerdeFactory<KeyType> combineKeySerdeFactory, com.google.common.util.concurrent.ListeningExecutorService executor, boolean sortHasNonGroupingFields, int concurrencyHint, int priority, long queryTimeoutAt, int intermediateCombineDegree)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CloseableIterator<Grouper.Entry<KeyType>>
combine(List<? extends CloseableIterator<Grouper.Entry<KeyType>>> sortedIterators, List<String> mergedDictionary)
Build a combining tree for the input iterators which combine input entries asynchronously.
-
-
-
Constructor Detail
-
ParallelCombiner
public ParallelCombiner(ReferenceCountingResourceHolder<ByteBuffer> combineBufferHolder, AggregatorFactory[] combiningFactories, Grouper.KeySerdeFactory<KeyType> combineKeySerdeFactory, com.google.common.util.concurrent.ListeningExecutorService executor, boolean sortHasNonGroupingFields, int concurrencyHint, int priority, long queryTimeoutAt, int intermediateCombineDegree)
-
-
Method Detail
-
combine
public CloseableIterator<Grouper.Entry<KeyType>> combine(List<? extends CloseableIterator<Grouper.Entry<KeyType>>> sortedIterators, List<String> mergedDictionary)
Build a combining tree for the input iterators which combine input entries asynchronously. Each node in the tree is a combining task which iterates through child iterators, aggregates the inputs from those iterators, and returns an iterator for the result of aggregation.This method is called when data is spilled and thus streaming combine is preferred to avoid too many disk accesses.
- Returns:
- an iterator of the root grouper of the combining tree
-
-