public abstract class SketchAggregatorFactory extends AggregatorFactory
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_SKETCH_SIZE |
protected String |
fieldName |
protected String |
name |
protected int |
size |
Constructor and Description |
---|
SketchAggregatorFactory(String name,
String fieldName,
Integer size,
byte cacheId) |
Modifier and Type | Method and Description |
---|---|
Object |
combine(Object lhs,
Object rhs)
A method that knows how to combine the outputs of
Aggregator.get() produced via AggregatorFactory.factorize(io.druid.segment.ColumnSelectorFactory) or BufferAggregator.get(java.nio.ByteBuffer, int) produced via AggregatorFactory.factorizeBuffered(io.druid.segment.ColumnSelectorFactory) . |
Object |
deserialize(Object object)
A method that knows how to "deserialize" the object from whatever form it might have been put into
in order to transfer via JSON.
|
boolean |
equals(Object o) |
Aggregator |
factorize(ColumnSelectorFactory metricFactory) |
BufferAggregator |
factorizeBuffered(ColumnSelectorFactory metricFactory) |
byte[] |
getCacheKey()
Get a byte array used as a cache key.
|
Comparator<Object> |
getComparator() |
String |
getFieldName() |
int |
getMaxIntermediateSize()
Returns the maximum size that this aggregator will require in bytes for intermediate storage of results.
|
String |
getName() |
int |
getSize() |
int |
hashCode() |
AggregateCombiner |
makeAggregateCombiner()
Creates an AggregateCombiner to fold rollup aggregation results from serveral "rows" of different indexes during
index merging.
|
List<String> |
requiredFields() |
String |
toString() |
finalizeComputation, getCombiningFactory, getMergingFactory, getRequiredColumns, getTypeName, mergeAggregators
public static final int DEFAULT_MAX_SKETCH_SIZE
protected final String name
protected final String fieldName
protected final int size
public Aggregator factorize(ColumnSelectorFactory metricFactory)
factorize
in class AggregatorFactory
public BufferAggregator factorizeBuffered(ColumnSelectorFactory metricFactory)
factorizeBuffered
in class AggregatorFactory
public Object deserialize(Object object)
AggregatorFactory
deserialize
in class AggregatorFactory
object
- the object to deserializepublic Comparator<Object> getComparator()
getComparator
in class AggregatorFactory
public Object combine(Object lhs, Object rhs)
AggregatorFactory
Aggregator.get()
produced via AggregatorFactory.factorize(io.druid.segment.ColumnSelectorFactory)
or BufferAggregator.get(java.nio.ByteBuffer, int)
produced via AggregatorFactory.factorizeBuffered(io.druid.segment.ColumnSelectorFactory)
. Note, even though this method is called "combine",
this method's contract *does* allow for mutation of the input objects. Thus, any use of lhs or rhs after calling
this method is highly discouraged.combine
in class AggregatorFactory
lhs
- The left hand side of the combinerhs
- The right hand side of the combinepublic AggregateCombiner makeAggregateCombiner()
AggregatorFactory
AggregatorFactory.combine(java.lang.Object, java.lang.Object)
, with the difference that it uses
ColumnValueSelector
and it's subinterfaces to get inputs and implements ColumnValueSelector
to provide output.makeAggregateCombiner
in class AggregatorFactory
AggregateCombiner
,
IndexMerger
public String getName()
getName
in class AggregatorFactory
public String getFieldName()
public int getSize()
public int getMaxIntermediateSize()
AggregatorFactory
getMaxIntermediateSize
in class AggregatorFactory
public List<String> requiredFields()
requiredFields
in class AggregatorFactory
public byte[] getCacheKey()
Cacheable
Copyright © 2011–2018. All rights reserved.