T
- Type of itempublic abstract class UnionFrequentItemsSketch<T>
extends org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>
implements org.apache.pig.Accumulator<org.apache.pig.data.Tuple>
Constructor and Description |
---|
UnionFrequentItemsSketch(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, warn
public UnionFrequentItemsSketch(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 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>
IOException
public void accumulate(org.apache.pig.data.Tuple inputTuple) throws IOException
accumulate
in interface org.apache.pig.Accumulator<org.apache.pig.data.Tuple>
IOException
public 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.