public class COV extends EvalFunc<DataBag> implements Algebraic
Modifier and Type | Class and Description |
---|---|
static class |
COV.Final |
static class |
COV.Initial |
static class |
COV.Intermed |
EvalFunc.SchemaType
Modifier and Type | Field and Description |
---|---|
protected java.util.Vector<java.lang.String> |
schemaName |
log, pigLogger, reporter, returnType
Constructor and Description |
---|
COV() |
COV(java.lang.String... schemaName) |
Modifier and Type | Method and Description |
---|---|
protected static Tuple |
combine(DataBag values)
combine results of different data chunk
|
protected static Tuple |
computeAll(DataBag first,
DataBag second)
compute sum(XY), sum(X), sum(Y) from given data sets
|
DataBag |
exec(Tuple input)
Function to compute covariance between data sets.
|
java.lang.String |
getFinal()
Get the final function.
|
java.lang.String |
getInitial()
Get the initial function.
|
java.lang.String |
getIntermed()
Get the intermediate function.
|
Schema |
outputSchema(Schema input)
Report the schema of the output of this UDF.
|
java.lang.String |
toString()
Function to return argument of constructor as string.
|
allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn
public DataBag exec(Tuple input) throws java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getInitial()
Algebraic
getInitial
in interface Algebraic
public java.lang.String getIntermed()
Algebraic
getIntermed
in interface Algebraic
public java.lang.String getFinal()
Algebraic
protected static Tuple combine(DataBag values) throws java.io.IOException
values
- DataBag containing partial results computed on different data chunksjava.io.IOException
protected static Tuple computeAll(DataBag first, DataBag second) throws java.io.IOException
first
- DataBag containing first data setsecond
- DataBag containing second data setjava.io.IOException
public Schema outputSchema(Schema input)
EvalFunc
The default implementation interprets the OutputSchema
annotation,
if one is present. Otherwise, it returns null
(no known output schema).
outputSchema
in class EvalFunc<DataBag>
input
- Schema of the inputCopyright © 2007-2017 The Apache Software Foundation