public class GeometricMeanAggregation extends AggregationFunction<GeometricMeanAggregation.GeometricMeanState,java.lang.Double>
Modifier and Type | Class and Description |
---|---|
static class |
GeometricMeanAggregation.GeometricMeanState |
static class |
GeometricMeanAggregation.GeometricMeanStateType |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Constructor and Description |
---|
GeometricMeanAggregation(FunctionInfo info) |
Modifier and Type | Method and Description |
---|---|
FunctionInfo |
info()
Provides meta information about this function implementation.
|
GeometricMeanAggregation.GeometricMeanState |
iterate(RamAccountingContext ramAccountingContext,
GeometricMeanAggregation.GeometricMeanState state,
Input... args)
the "aggregate" function.
|
GeometricMeanAggregation.GeometricMeanState |
newState(RamAccountingContext ramAccountingContext,
org.elasticsearch.Version indexVersionCreated,
org.elasticsearch.common.util.BigArrays bigArrays)
Called once per "aggregation cycle" to create an initial partial-state-value.
|
DataType |
partialType() |
GeometricMeanAggregation.GeometricMeanState |
reduce(RamAccountingContext ramAccountingContext,
GeometricMeanAggregation.GeometricMeanState state1,
GeometricMeanAggregation.GeometricMeanState state2)
This function merges two aggregation states together and returns that merged state.
|
static void |
register(AggregationImplModule mod) |
java.lang.Double |
terminatePartial(RamAccountingContext ramAccountingContext,
GeometricMeanAggregation.GeometricMeanState state)
Called to transform partial states into their final form.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
normalizeSymbol
public static final java.lang.String NAME
public GeometricMeanAggregation(FunctionInfo info)
public static void register(AggregationImplModule mod)
@Nullable public GeometricMeanAggregation.GeometricMeanState newState(RamAccountingContext ramAccountingContext, org.elasticsearch.Version indexVersionCreated, org.elasticsearch.common.util.BigArrays bigArrays)
AggregationFunction
newState
in class AggregationFunction<GeometricMeanAggregation.GeometricMeanState,java.lang.Double>
ramAccountingContext
- used to account the memory used for the state.indexVersionCreated
- the version the current index was created on, this is useful for BWCbigArrays
- the BigArrays singleton instance of the current nodepublic GeometricMeanAggregation.GeometricMeanState iterate(RamAccountingContext ramAccountingContext, GeometricMeanAggregation.GeometricMeanState state, Input... args) throws org.elasticsearch.common.breaker.CircuitBreakingException
AggregationFunction
iterate
in class AggregationFunction<GeometricMeanAggregation.GeometricMeanState,java.lang.Double>
ramAccountingContext
- used to account for additional memory usage if the state grows in sizestate
- the previous aggregation stateargs
- arguments / input values matching the types of FunctionInfo.argumentTypes.
These are usually used to increment/modify the previous stateorg.elasticsearch.common.breaker.CircuitBreakingException
public GeometricMeanAggregation.GeometricMeanState reduce(RamAccountingContext ramAccountingContext, GeometricMeanAggregation.GeometricMeanState state1, GeometricMeanAggregation.GeometricMeanState state2)
AggregationFunction
This is used in a distributed aggregation workflow where 2 partial aggregations are reduced into 1 partial aggregation
reduce
in class AggregationFunction<GeometricMeanAggregation.GeometricMeanState,java.lang.Double>
public java.lang.Double terminatePartial(RamAccountingContext ramAccountingContext, GeometricMeanAggregation.GeometricMeanState state)
AggregationFunction
terminatePartial
in class AggregationFunction<GeometricMeanAggregation.GeometricMeanState,java.lang.Double>
public DataType partialType()
partialType
in class AggregationFunction<GeometricMeanAggregation.GeometricMeanState,java.lang.Double>
public FunctionInfo info()
FunctionImplementation