public class CardinalityAggregatorFactory extends AggregatorFactory
| Constructor and Description | 
|---|
CardinalityAggregatorFactory(String name,
                            List<DimensionSpec> fields,
                            boolean byRow)  | 
CardinalityAggregatorFactory(String name,
                            List<String> fieldNames,
                            List<DimensionSpec> fields,
                            boolean byRow,
                            boolean round)  | 
| 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 columnFactory)  | 
BufferAggregator | 
factorizeBuffered(ColumnSelectorFactory columnFactory)  | 
Object | 
finalizeComputation(Object object)
"Finalizes" the computation of an object. 
 | 
byte[] | 
getCacheKey()
Get a byte array used as a cache key. 
 | 
AggregatorFactory | 
getCombiningFactory()
Returns an AggregatorFactory that can be used to combine the output of aggregators from this factory. 
 | 
Comparator | 
getComparator()  | 
List<DimensionSpec> | 
getFields()  | 
int | 
getMaxIntermediateSize()
Returns the maximum size that this aggregator will require in bytes for intermediate storage of results. 
 | 
String | 
getName()  | 
List<AggregatorFactory> | 
getRequiredColumns()
Gets a list of all columns that this AggregatorFactory will scan 
 | 
String | 
getTypeName()  | 
int | 
hashCode()  | 
boolean | 
isByRow()  | 
boolean | 
isRound()  | 
AggregateCombiner | 
makeAggregateCombiner()
Creates an AggregateCombiner to fold rollup aggregation results from serveral "rows" of different indexes during
 index merging. 
 | 
List<String> | 
requiredFields()  | 
String | 
toString()  | 
getMergingFactory, mergeAggregatorspublic CardinalityAggregatorFactory(String name, @Deprecated List<String> fieldNames, List<DimensionSpec> fields, boolean byRow, boolean round)
public CardinalityAggregatorFactory(String name, List<DimensionSpec> fields, boolean byRow)
public Aggregator factorize(ColumnSelectorFactory columnFactory)
factorize in class AggregatorFactorypublic BufferAggregator factorizeBuffered(ColumnSelectorFactory columnFactory)
factorizeBuffered in class AggregatorFactorypublic Comparator getComparator()
getComparator in class AggregatorFactorypublic Object combine(Object lhs, Object rhs)
AggregatorFactoryAggregator.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 AggregatorFactorylhs - The left hand side of the combinerhs - The right hand side of the combinepublic AggregateCombiner makeAggregateCombiner()
AggregatorFactoryAggregatorFactory.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 AggregatorFactoryAggregateCombiner, 
IndexMergerpublic AggregatorFactory getCombiningFactory()
AggregatorFactorygetCombiningFactory in class AggregatorFactorypublic List<AggregatorFactory> getRequiredColumns()
AggregatorFactorygetRequiredColumns in class AggregatorFactorypublic Object deserialize(Object object)
AggregatorFactorydeserialize in class AggregatorFactoryobject - the object to deserializepublic Object finalizeComputation(Object object)
AggregatorFactoryfinalizeComputation in class AggregatorFactoryobject - the object to be finalizedpublic String getName()
getName in class AggregatorFactorypublic List<String> requiredFields()
requiredFields in class AggregatorFactorypublic List<DimensionSpec> getFields()
public boolean isByRow()
public boolean isRound()
public byte[] getCacheKey()
Cacheablepublic String getTypeName()
getTypeName in class AggregatorFactorypublic int getMaxIntermediateSize()
AggregatorFactorygetMaxIntermediateSize in class AggregatorFactoryCopyright © 2011–2018. All rights reserved.