public class ReservoirUnion
extends org.apache.pig.AccumulatorEvalFunc<org.apache.pig.data.Tuple>
| Constructor and Description |
|---|
ReservoirUnion(String kStr)
Reservoir sampling constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accumulate(org.apache.pig.data.Tuple inputTuple) |
void |
cleanup() |
org.apache.pig.data.Tuple |
getValue() |
org.apache.pig.impl.logicalLayer.schema.Schema |
outputSchema(org.apache.pig.impl.logicalLayer.schema.Schema input)
Validates format of input schema and returns a matching schema
|
allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warnpublic ReservoirUnion(String kStr)
kStr - String indicating the maximum number of desired entries in the reservoir.public void accumulate(org.apache.pig.data.Tuple inputTuple)
throws IOException
accumulate in interface org.apache.pig.Accumulator<org.apache.pig.data.Tuple>accumulate in class org.apache.pig.AccumulatorEvalFunc<org.apache.pig.data.Tuple>IOExceptionpublic org.apache.pig.data.Tuple getValue()
getValue in interface org.apache.pig.Accumulator<org.apache.pig.data.Tuple>getValue in class org.apache.pig.AccumulatorEvalFunc<org.apache.pig.data.Tuple>public void cleanup()
cleanup in interface org.apache.pig.Accumulator<org.apache.pig.data.Tuple>cleanup in class org.apache.pig.AccumulatorEvalFunc<org.apache.pig.data.Tuple>public org.apache.pig.impl.logicalLayer.schema.Schema outputSchema(org.apache.pig.impl.logicalLayer.schema.Schema input)
outputSchema in class org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>input - Expects input to be a bag of sketches: (n, k, {(samples...)})Copyright © 2015–2020 The Apache Software Foundation. All rights reserved.