public class COR extends EvalFunc<DataBag> implements Algebraic
| Modifier and Type | Class and Description |
|---|---|
static class |
COR.Final |
static class |
COR.Initial |
static class |
COR.Intermed |
EvalFunc.SchemaType| Modifier and Type | Field and Description |
|---|---|
protected Vector<String> |
schemaName |
log, pigLogger, reporter, returnType| 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), sum(XX), sum(YY) from given data sets
|
DataBag |
exec(Tuple input)
Function to compute correlation between data sets.
|
String |
getFinal()
Get the final function.
|
String |
getInitial()
Get the initial function.
|
String |
getIntermed()
Get the intermediate function.
|
Schema |
outputSchema(Schema input)
Report the schema of the output of this UDF.
|
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, warnpublic COR()
public COR(String... schemaName)
public DataBag exec(Tuple input) throws IOException
exec in class EvalFunc<DataBag>input - input tuple which contains data sets.IOExceptionpublic String toString()
public String getInitial()
AlgebraicgetInitial in interface Algebraicpublic String getIntermed()
AlgebraicgetIntermed in interface Algebraicpublic String getFinal()
Algebraicprotected static Tuple combine(DataBag values) throws IOException
values - DataBag containing partial results computed on different data chunksIOExceptionprotected static Tuple computeAll(DataBag first, DataBag second) throws IOException
first - DataBag containing first data setsecond - DataBag containing second data setIOExceptionpublic 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