public class DataToVarOptSketch
extends org.apache.pig.AccumulatorEvalFunc<org.apache.pig.data.DataByteArray>
implements org.apache.pig.Algebraic
Constructor and Description |
---|
DataToVarOptSketch(String kStr)
VarOpt sampling constructor.
|
DataToVarOptSketch(String kStr,
String weightIdxStr)
VarOpt sampling constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accumulate(org.apache.pig.data.Tuple inputTuple) |
void |
cleanup() |
String |
getFinal() |
String |
getInitial() |
String |
getIntermed() |
org.apache.pig.data.DataByteArray |
getValue() |
org.apache.pig.impl.logicalLayer.schema.Schema |
outputSchema(org.apache.pig.impl.logicalLayer.schema.Schema input) |
allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn
public DataToVarOptSketch(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.DataByteArray>
accumulate
in class org.apache.pig.AccumulatorEvalFunc<org.apache.pig.data.DataByteArray>
IOException
public org.apache.pig.data.DataByteArray getValue()
getValue
in interface org.apache.pig.Accumulator<org.apache.pig.data.DataByteArray>
getValue
in class org.apache.pig.AccumulatorEvalFunc<org.apache.pig.data.DataByteArray>
public void cleanup()
cleanup
in interface org.apache.pig.Accumulator<org.apache.pig.data.DataByteArray>
cleanup
in class org.apache.pig.AccumulatorEvalFunc<org.apache.pig.data.DataByteArray>
public String getInitial()
getInitial
in interface org.apache.pig.Algebraic
public String getIntermed()
getIntermed
in interface org.apache.pig.Algebraic
public String getFinal()
getFinal
in interface org.apache.pig.Algebraic
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.DataByteArray>
Copyright © 2015–2019 The Apache Software Foundation. All rights reserved.