public class UnionSketch
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 |
UnionSketch.Final
Class used to calculate the final pass of an Algebraic union operation.
|
static class |
UnionSketch.Initial
Class used to calculate the initial pass of an Algebraic sketch operation.
|
static class |
UnionSketch.Intermediate
Class used to calculate the intermediate pass of an Algebraic union operation.
|
| Constructor and Description |
|---|
UnionSketch()
Default constructor.
|
UnionSketch(String kStr)
Constructor with explicit k as string.
|
| 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 of the Union 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, warnpublic UnionSketch()
public UnionSketch(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 Sketch TuplesIOExceptionpublic 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 Sketch 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.Algebraicpublic String getIntermed()
getIntermed in interface org.apache.pig.Algebraicpublic String getFinal()
getFinal in interface org.apache.pig.AlgebraicCopyright © 2015–2020 The Apache Software Foundation. All rights reserved.