T - type of itempublic abstract class DataToFrequentItemsSketch<T>
extends org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>
implements org.apache.pig.Accumulator<org.apache.pig.data.Tuple>
| Constructor and Description |
|---|
DataToFrequentItemsSketch(int sketchSize,
org.apache.datasketches.ArrayOfItemsSerDe<T> serDe)
Constructs a function given a sketch size and serde
|
| 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 DataToFrequentItemsSketch(int sketchSize,
org.apache.datasketches.ArrayOfItemsSerDe<T> serDe)
sketchSize - parameter controlling the size of the sketch and the accuracyserDe - an instance of ArrayOfItemsSerDe to serialize and deserialize arrays of itemspublic void accumulate(org.apache.pig.data.Tuple inputTuple)
throws IOException
accumulate in interface org.apache.pig.Accumulator<org.apache.pig.data.Tuple>IOExceptionpublic void cleanup()
cleanup in interface org.apache.pig.Accumulator<org.apache.pig.data.Tuple>public org.apache.pig.data.Tuple getValue()
getValue in interface org.apache.pig.Accumulator<org.apache.pig.data.Tuple>public 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>IOExceptionCopyright © 2015–2020 The Apache Software Foundation. All rights reserved.