org.apache.hadoop.hive.ql.udf.generic
Class GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator

java.lang.Object
  extended by org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator
      extended by org.apache.hadoop.hive.ql.udf.generic.GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
GenericUDAFPercentileApprox.GenericUDAFMultiplePercentileApproxEvaluator, GenericUDAFPercentileApprox.GenericUDAFSinglePercentileApproxEvaluator
Enclosing class:
GenericUDAFPercentileApprox

public abstract static class GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator
extends GenericUDAFEvaluator

Construct a histogram using the algorithm described by Ben-Haim and Tom-Tov, and then use it to compute an approximate percentile value.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator
GenericUDAFEvaluator.AbstractAggregationBuffer, GenericUDAFEvaluator.AggregationBuffer, GenericUDAFEvaluator.AggregationType, GenericUDAFEvaluator.Mode
 
Constructor Summary
GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator()
           
 
Method Summary
 GenericUDAFEvaluator.AggregationBuffer getNewAggregationBuffer()
          Get a new aggregation object.
 void iterate(GenericUDAFEvaluator.AggregationBuffer agg, Object[] parameters)
          Iterate through original data.
 void merge(GenericUDAFEvaluator.AggregationBuffer agg, Object partial)
          Merge with partial aggregation result.
 void reset(GenericUDAFEvaluator.AggregationBuffer agg)
          Reset the aggregation.
 Object terminatePartial(GenericUDAFEvaluator.AggregationBuffer agg)
          Get partial aggregation result.
 
Methods inherited from class org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator
aggregate, close, configure, evaluate, init, isEstimable, terminate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator

public GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator()
Method Detail

merge

public void merge(GenericUDAFEvaluator.AggregationBuffer agg,
                  Object partial)
           throws HiveException
Description copied from class: GenericUDAFEvaluator
Merge with partial aggregation result. NOTE: null might be passed in case there is no input data.

Specified by:
merge in class GenericUDAFEvaluator
partial - The partial aggregation result.
Throws:
HiveException

terminatePartial

public Object terminatePartial(GenericUDAFEvaluator.AggregationBuffer agg)
                        throws HiveException
Description copied from class: GenericUDAFEvaluator
Get partial aggregation result.

Specified by:
terminatePartial in class GenericUDAFEvaluator
Returns:
partial aggregation result.
Throws:
HiveException

iterate

public void iterate(GenericUDAFEvaluator.AggregationBuffer agg,
                    Object[] parameters)
             throws HiveException
Description copied from class: GenericUDAFEvaluator
Iterate through original data.

Specified by:
iterate in class GenericUDAFEvaluator
parameters - The objects of parameters.
Throws:
HiveException

getNewAggregationBuffer

public GenericUDAFEvaluator.AggregationBuffer getNewAggregationBuffer()
                                                               throws HiveException
Description copied from class: GenericUDAFEvaluator
Get a new aggregation object.

Specified by:
getNewAggregationBuffer in class GenericUDAFEvaluator
Throws:
HiveException

reset

public void reset(GenericUDAFEvaluator.AggregationBuffer agg)
           throws HiveException
Description copied from class: GenericUDAFEvaluator
Reset the aggregation. This is useful if we want to reuse the same aggregation.

Specified by:
reset in class GenericUDAFEvaluator
Throws:
HiveException


Copyright © 2014 The Apache Software Foundation. All rights reserved.