public class GenericUDAFMkCollectionEvaluator extends GenericUDAFEvaluator implements Serializable
GenericUDAFEvaluator.AbstractAggregationBuffer, GenericUDAFEvaluator.AggregationBuffer, GenericUDAFEvaluator.AggregationType, GenericUDAFEvaluator.Mode
Constructor and Description |
---|
GenericUDAFMkCollectionEvaluator() |
GenericUDAFMkCollectionEvaluator(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMkCollectionEvaluator.BufferType bufferType) |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMkCollectionEvaluator.BufferType |
getBufferType() |
GenericUDAFEvaluator.AggregationBuffer |
getNewAggregationBuffer()
Get a new aggregation object.
|
ObjectInspector |
init(GenericUDAFEvaluator.Mode m,
ObjectInspector[] parameters)
Initialize the evaluator.
|
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.
|
void |
setBufferType(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMkCollectionEvaluator.BufferType bufferType) |
Object |
terminate(GenericUDAFEvaluator.AggregationBuffer agg)
Get final aggregation result.
|
Object |
terminatePartial(GenericUDAFEvaluator.AggregationBuffer agg)
Get partial aggregation result.
|
aggregate, close, configure, evaluate, getWindowingEvaluator, isEstimable
public GenericUDAFMkCollectionEvaluator()
public GenericUDAFMkCollectionEvaluator(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMkCollectionEvaluator.BufferType bufferType)
public ObjectInspector init(GenericUDAFEvaluator.Mode m, ObjectInspector[] parameters) throws HiveException
GenericUDAFEvaluator
init
in class GenericUDAFEvaluator
m
- The mode of aggregation.parameters
- The ObjectInspector for the parameters: In PARTIAL1 and COMPLETE
mode, the parameters are original data; In PARTIAL2 and FINAL
mode, the parameters are just partial aggregations (in that case,
the array will always have a single element).HiveException
public void reset(GenericUDAFEvaluator.AggregationBuffer agg) throws HiveException
GenericUDAFEvaluator
reset
in class GenericUDAFEvaluator
HiveException
public GenericUDAFEvaluator.AggregationBuffer getNewAggregationBuffer() throws HiveException
GenericUDAFEvaluator
getNewAggregationBuffer
in class GenericUDAFEvaluator
HiveException
public void iterate(GenericUDAFEvaluator.AggregationBuffer agg, Object[] parameters) throws HiveException
GenericUDAFEvaluator
iterate
in class GenericUDAFEvaluator
parameters
- The objects of parameters.HiveException
public Object terminatePartial(GenericUDAFEvaluator.AggregationBuffer agg) throws HiveException
GenericUDAFEvaluator
terminatePartial
in class GenericUDAFEvaluator
HiveException
public void merge(GenericUDAFEvaluator.AggregationBuffer agg, Object partial) throws HiveException
GenericUDAFEvaluator
merge
in class GenericUDAFEvaluator
partial
- The partial aggregation result.HiveException
public Object terminate(GenericUDAFEvaluator.AggregationBuffer agg) throws HiveException
GenericUDAFEvaluator
terminate
in class GenericUDAFEvaluator
HiveException
public org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMkCollectionEvaluator.BufferType getBufferType()
public void setBufferType(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMkCollectionEvaluator.BufferType bufferType)
Copyright © 2017 The Apache Software Foundation. All rights reserved.