public abstract class GenericUDAFStreamingEvaluator<T1> extends GenericUDAFEvaluator implements ISupportStreamingModeForWindowing
Modifier and Type | Class and Description |
---|---|
static class |
GenericUDAFStreamingEvaluator.SumAvgEnhancer<T1,T2> |
GenericUDAFEvaluator.AbstractAggregationBuffer, GenericUDAFEvaluator.AggregationBuffer, GenericUDAFEvaluator.AggregationType, GenericUDAFEvaluator.Mode
Modifier and Type | Field and Description |
---|---|
protected int |
numFollowing |
protected int |
numPreceding |
protected GenericUDAFEvaluator |
wrappedEval |
NULL_RESULT
Constructor and Description |
---|
GenericUDAFStreamingEvaluator(GenericUDAFEvaluator wrappedEval,
int numPreceding,
int numFollowing) |
Modifier and Type | Method and Description |
---|---|
Object |
getNextResult(GenericUDAFEvaluator.AggregationBuffer agg) |
ObjectInspector |
init(GenericUDAFEvaluator.Mode m,
ObjectInspector[] parameters)
Initialize the evaluator.
|
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.
|
aggregate, close, configure, evaluate, getNewAggregationBuffer, getWindowingEvaluator, isEstimable, iterate, terminate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRowsRemainingAfterTerminate
protected final GenericUDAFEvaluator wrappedEval
protected final int numPreceding
protected final int numFollowing
public GenericUDAFStreamingEvaluator(GenericUDAFEvaluator wrappedEval, int numPreceding, int numFollowing)
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 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 getNextResult(GenericUDAFEvaluator.AggregationBuffer agg) throws HiveException
getNextResult
in interface ISupportStreamingModeForWindowing
HiveException
Copyright © 2017 The Apache Software Foundation. All rights reserved.