public class DataToArrayOfDoublesSketch
extends org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>
implements org.apache.pig.Algebraic
Modifier and Type | Class and Description |
---|---|
static class |
DataToArrayOfDoublesSketch.Initial |
static class |
DataToArrayOfDoublesSketch.IntermediateFinal |
Constructor and Description |
---|
DataToArrayOfDoublesSketch()
Constructor with default sketch size, default sampling probability of 1
and default number of values per key, which is 1.
|
DataToArrayOfDoublesSketch(String numValues)
Constructor with default sketch size and default sampling probability of 1.
|
DataToArrayOfDoublesSketch(String sketchSize,
String numValues)
Constructor with given sketch size, number of values and default sampling probability of 1.
|
DataToArrayOfDoublesSketch(String sketchSize,
String samplingProbability,
String numValues)
Constructor with given sketch size, sampling probability and number of values.
|
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) |
String |
getFinal() |
String |
getInitial() |
String |
getIntermed() |
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 DataToArrayOfDoublesSketch()
public DataToArrayOfDoublesSketch(String numValues)
numValues
- Number of double values to keep for each keypublic DataToArrayOfDoublesSketch(String sketchSize, String numValues)
sketchSize
- String representation of sketch sizenumValues
- Number of double values to keep for each keypublic DataToArrayOfDoublesSketch(String sketchSize, String samplingProbability, String numValues)
sketchSize
- String representation of sketch sizesamplingProbability
- probability from 0 to 1numValues
- Number of double values to keep for each keypublic 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 void accumulate(org.apache.pig.data.Tuple inputTuple) throws IOException
accumulate
in interface org.apache.pig.Accumulator<org.apache.pig.data.Tuple>
IOException
public 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>
IOException
Copyright © 2015–2019 The Apache Software Foundation. All rights reserved.