S - Summary typepublic abstract class UnionSketch<S extends org.apache.datasketches.tuple.Summary>
extends org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>
implements org.apache.pig.Accumulator<org.apache.pig.data.Tuple>
| Constructor and Description |
|---|
UnionSketch(int sketchSize,
org.apache.datasketches.tuple.SummarySetOperations<S> summarySetOps,
org.apache.datasketches.tuple.SummaryDeserializer<S> summaryDeserializer)
Constructs a function given a sketch size, summary set operations and summary deserializer
|
UnionSketch(org.apache.datasketches.tuple.SummarySetOperations<S> summarySetOps,
org.apache.datasketches.tuple.SummaryDeserializer<S> summaryDeserializer)
Constructs a function given a summary set operations, summary deserializer and default sketch size
|
| Modifier and Type | Method and Description |
|---|---|
void |
accumulate(org.apache.pig.data.Tuple inputTuple) |
void |
cleanup() |
org.apache.pig.data.Tuple |
exec(org.apache.pig.data.Tuple inputTuple) |
org.apache.pig.data.Tuple |
getValue() |
allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, outputSchema, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warnpublic UnionSketch(org.apache.datasketches.tuple.SummarySetOperations<S> summarySetOps, org.apache.datasketches.tuple.SummaryDeserializer<S> summaryDeserializer)
summarySetOps - an instance of SummarySetOperationssummaryDeserializer - an instance of SummaryDeserializerpublic UnionSketch(int sketchSize,
org.apache.datasketches.tuple.SummarySetOperations<S> summarySetOps,
org.apache.datasketches.tuple.SummaryDeserializer<S> summaryDeserializer)
sketchSize - parameter controlling the size of the sketch and the accuracy.
It represents nominal number of entries in the sketch. Forced to the nearest power of 2
greater than given value.summarySetOps - an instance of SummarySetOperationssummaryDeserializer - an instance of SummaryDeserializerpublic org.apache.pig.data.Tuple exec(org.apache.pig.data.Tuple inputTuple)
throws IOException
exec in class org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>IOExceptionpublic void accumulate(org.apache.pig.data.Tuple inputTuple)
throws IOException
accumulate in interface org.apache.pig.Accumulator<org.apache.pig.data.Tuple>IOExceptionpublic org.apache.pig.data.Tuple getValue()
getValue in interface org.apache.pig.Accumulator<org.apache.pig.data.Tuple>public void cleanup()
cleanup in interface org.apache.pig.Accumulator<org.apache.pig.data.Tuple>Copyright © 2015–2019 The Apache Software Foundation. All rights reserved.