public class DataToSketch
extends org.apache.pig.EvalFunc<org.apache.pig.data.DataByteArray>
implements org.apache.pig.Accumulator<org.apache.pig.data.DataByteArray>, org.apache.pig.Algebraic
Modifier and Type | Class and Description |
---|---|
static class |
DataToSketch.Final
Class used to calculate the final pass of an Algebraic sketch operation.
|
static class |
DataToSketch.Initial
Class used to calculate the initial pass of an Algebraic sketch operation.
|
static class |
DataToSketch.Intermediate
Class used to calculate the intermediate pass of an Algebraic sketch operation.
|
Constructor and Description |
---|
DataToSketch()
Default constructor.
|
DataToSketch(String kStr)
String constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accumulate(org.apache.pig.data.Tuple inputTuple)
An Accumulator version of the standard exec() method.
|
void |
cleanup()
Cleans up the UDF state after being called using the
Accumulator interface. |
org.apache.pig.data.DataByteArray |
exec(org.apache.pig.data.Tuple inputTuple)
Top-level exec function.
|
String |
getFinal() |
String |
getInitial() |
String |
getIntermed() |
org.apache.pig.data.DataByteArray |
getValue()
Returns the result that has been built up by multiple calls to
accumulate(org.apache.pig.data.Tuple) . |
allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, outputSchema, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn
public DataToSketch()
public DataToSketch(String kStr)
kStr
- string representation of kpublic org.apache.pig.data.DataByteArray exec(org.apache.pig.data.Tuple inputTuple) throws IOException
Types are in the form: Java data type: Pig DataType
Input Tuple
exec
in class org.apache.pig.EvalFunc<org.apache.pig.data.DataByteArray>
inputTuple
- A tuple containing a single bag, containing Datum TuplesIOException
- from Pigpublic void accumulate(org.apache.pig.data.Tuple inputTuple) throws IOException
accumulate
in interface org.apache.pig.Accumulator<org.apache.pig.data.DataByteArray>
inputTuple
- A tuple containing a single bag, containing Datum Tuples.IOException
- by Pigexec(org.apache.pig.data.Tuple)
,
"org.apache.pig.Accumulator.accumulate(org.apache.pig.data.Tuple)"public org.apache.pig.data.DataByteArray getValue()
accumulate(org.apache.pig.data.Tuple)
.getValue
in interface org.apache.pig.Accumulator<org.apache.pig.data.DataByteArray>
public void cleanup()
Accumulator
interface.cleanup
in interface org.apache.pig.Accumulator<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
Copyright © 2015–2019 The Apache Software Foundation. All rights reserved.