Class UnionSketchUDAF.UnionSketchEvaluator<S extends org.apache.datasketches.tuple.Summary>
- java.lang.Object
-
- org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator
-
- org.apache.datasketches.hive.tuple.UnionSketchUDAF.UnionSketchEvaluator<S>
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
UnionDoubleSummarySketchUDAF.UnionDoubleSummarySketchEvaluator,UnionDoubleSummaryWithModeSketchUDAF.UnionDoubleSummaryWithModeSketchEvaluator
- Enclosing class:
- UnionSketchUDAF
public abstract static class UnionSketchUDAF.UnionSketchEvaluator<S extends org.apache.datasketches.tuple.Summary> extends org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator
org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AbstractAggregationBuffer, org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer, org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationType, org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.Mode
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspectorintermediateInspector_protected static StringNOMINAL_NUM_ENTRIES_FIELDprotected org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspectornominalNumEntriesInspector_protected static StringSKETCH_FIELD
-
Constructor Summary
Constructors Constructor Description UnionSketchEvaluator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffergetNewAggregationBuffer()protected abstract org.apache.datasketches.tuple.SummaryDeserializer<S>getSummaryDeserializer()Get an instance of SummaryDeserializerprotected abstract org.apache.datasketches.tuple.SummaryFactory<S>getSummaryFactory(Object[] data)Get an instance of SummaryFactory possibly parameterized based on the original input array of objects.protected abstract org.apache.datasketches.tuple.SummarySetOperations<S>getSummarySetOperationsForIterate(Object[] data)Get an instance of SummarySetOperations possibly parameterized based on the original input array of objects.protected abstract org.apache.datasketches.tuple.SummarySetOperations<S>getSummarySetOperationsForMerge(Object data)Get an instance of SummarySetOperations possibly parameterized based on the intermediate data object.org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorinit(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.Mode mode, org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector[] inspectors)protected voidinitializeState(org.apache.datasketches.hive.tuple.UnionState<S> state, Object data)protected voidinitializeState(org.apache.datasketches.hive.tuple.UnionState<S> state, Object[] data)voiditerate(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer buf, Object[] data)voidmerge(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer buf, Object data)voidreset(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer buf)Objectterminate(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer buf)ObjectterminatePartial(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer buf)
-
-
-
Field Detail
-
NOMINAL_NUM_ENTRIES_FIELD
protected static final String NOMINAL_NUM_ENTRIES_FIELD
- See Also:
- Constant Field Values
-
SKETCH_FIELD
protected static final String SKETCH_FIELD
- See Also:
- Constant Field Values
-
nominalNumEntriesInspector_
protected org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector nominalNumEntriesInspector_
-
intermediateInspector_
protected org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector intermediateInspector_
-
-
Method Detail
-
init
public org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector init(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.Mode mode, org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector[] inspectors) throws org.apache.hadoop.hive.ql.metadata.HiveException- Overrides:
initin classorg.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator- Throws:
org.apache.hadoop.hive.ql.metadata.HiveException
-
iterate
public void iterate(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer buf, Object[] data) throws org.apache.hadoop.hive.ql.metadata.HiveException- Specified by:
iteratein classorg.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator- Throws:
org.apache.hadoop.hive.ql.metadata.HiveException
-
initializeState
protected void initializeState(org.apache.datasketches.hive.tuple.UnionState<S> state, Object[] data)
-
getNewAggregationBuffer
public org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer getNewAggregationBuffer() throws org.apache.hadoop.hive.ql.metadata.HiveException- Specified by:
getNewAggregationBufferin classorg.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator- Throws:
org.apache.hadoop.hive.ql.metadata.HiveException
-
getSummaryDeserializer
protected abstract org.apache.datasketches.tuple.SummaryDeserializer<S> getSummaryDeserializer()
Get an instance of SummaryDeserializer- Returns:
- SummaryDeserializer
-
getSummaryFactory
protected abstract org.apache.datasketches.tuple.SummaryFactory<S> getSummaryFactory(Object[] data)
Get an instance of SummaryFactory possibly parameterized based on the original input array of objects. Might be called once during the first call to iterate.- Parameters:
data- original input array of objects- Returns:
- an instance of SummaryFactory
-
getSummarySetOperationsForIterate
protected abstract org.apache.datasketches.tuple.SummarySetOperations<S> getSummarySetOperationsForIterate(Object[] data)
Get an instance of SummarySetOperations possibly parameterized based on the original input array of objects. Might be called once during the first call to iterate.- Parameters:
data- original input array of objects- Returns:
- an instance of SummarySetOperations
-
terminatePartial
public Object terminatePartial(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer buf) throws org.apache.hadoop.hive.ql.metadata.HiveException
- Specified by:
terminatePartialin classorg.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator- Throws:
org.apache.hadoop.hive.ql.metadata.HiveException
-
merge
public void merge(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer buf, Object data) throws org.apache.hadoop.hive.ql.metadata.HiveException- Specified by:
mergein classorg.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator- Throws:
org.apache.hadoop.hive.ql.metadata.HiveException
-
initializeState
protected void initializeState(org.apache.datasketches.hive.tuple.UnionState<S> state, Object data)
-
getSummarySetOperationsForMerge
protected abstract org.apache.datasketches.tuple.SummarySetOperations<S> getSummarySetOperationsForMerge(Object data)
Get an instance of SummarySetOperations possibly parameterized based on the intermediate data object. Might be called once during the first call to merge.- Parameters:
data- intermediate data object- Returns:
- an instance of SummarySetOperations
-
terminate
public Object terminate(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer buf) throws org.apache.hadoop.hive.ql.metadata.HiveException
- Specified by:
terminatein classorg.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator- Throws:
org.apache.hadoop.hive.ql.metadata.HiveException
-
reset
public void reset(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer buf) throws org.apache.hadoop.hive.ql.metadata.HiveException- Specified by:
resetin classorg.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator- Throws:
org.apache.hadoop.hive.ql.metadata.HiveException
-
-