public class StreamingMergeSortedGrouper<KeyType> extends Object implements Grouper<KeyType>
Grouper.BufferComparator, Grouper.Entry<T>, Grouper.KeySerde<T>, Grouper.KeySerdeFactory<T>| Modifier and Type | Method and Description |
|---|---|
AggregateResult |
aggregate(KeyType key)
Aggregate the current row with the provided key.
|
AggregateResult |
aggregate(KeyType key,
int notUsed)
Aggregate the current row with the provided key.
|
void |
close()
Close the grouper and release associated resources.
|
void |
finish()
Signal that no more inputs are added.
|
void |
init()
Initialize the grouper.
|
boolean |
isInitialized()
Check this grouper is initialized or not.
|
CloseableIterator<Grouper.Entry<KeyType>> |
iterator()
Return a sorted iterator.
|
CloseableIterator<Grouper.Entry<KeyType>> |
iterator(boolean sorted)
Return a sorted iterator.
|
static <KeyType> int |
requiredBufferCapacity(Grouper.KeySerde<KeyType> keySerde,
AggregatorFactory[] aggregatorFactories)
Returns the minimum buffer capacity required for this grouper.
|
void |
reset()
Reset the grouper to its initial state.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithashFunctionpublic static <KeyType> int requiredBufferCapacity(Grouper.KeySerde<KeyType> keySerde, AggregatorFactory[] aggregatorFactories)
public void init()
GrouperGrouper.aggregate(Object) and Grouper.aggregate(Object, int).public boolean isInitialized()
GrouperisInitialized in interface Grouper<KeyType>public AggregateResult aggregate(KeyType key, int notUsed)
Grouperaggregate in interface Grouper<KeyType>key - key objectnotUsed - result of Grouper.hashFunction() on the keypublic AggregateResult aggregate(KeyType key)
Grouperpublic void reset()
Grouperpublic void close()
Grouperpublic void finish()
aggregate(Object) is called for the last input.public CloseableIterator<Grouper.Entry<KeyType>> iterator()
public CloseableIterator<Grouper.Entry<KeyType>> iterator(boolean sorted)
Copyright © 2011–2018. All rights reserved.