org.apache.pig.piggybank.evaluation.stats
Class COR

java.lang.Object
  extended by org.apache.pig.EvalFunc<DataBag>
      extended by org.apache.pig.piggybank.evaluation.stats.COR
All Implemented Interfaces:
Serializable, Algebraic

Deprecated. Use COR

@Deprecated
public class COR
extends EvalFunc<DataBag>
implements Algebraic, Serializable

See Also:
Serialized Form

Nested Class Summary
static class COR.Final
          Deprecated.  
static class COR.Initial
          Deprecated.  
static class COR.Intermed
          Deprecated.  
 
Nested classes/interfaces inherited from class org.apache.pig.EvalFunc
EvalFunc.SchemaType
 
Field Summary
protected  Vector<String> schemaName
          Deprecated.  
 
Fields inherited from class org.apache.pig.EvalFunc
log, pigLogger, reporter, returnType
 
Constructor Summary
COR()
          Deprecated.  
COR(String... schemaName)
          Deprecated.  
 
Method Summary
protected static Tuple combine(DataBag values)
          Deprecated. combine results of different data chunk
protected static Tuple computeAll(DataBag first, DataBag second)
          Deprecated. compute sum(XY), sum(X), sum(Y), sum(XX), sum(YY) from given data sets
 DataBag exec(Tuple input)
          Deprecated. Function to compute correlation between data sets.
 String getFinal()
          Deprecated. Get the final function.
 String getInitial()
          Deprecated. Get the initial function.
 String getIntermed()
          Deprecated. Get the intermediate function.
 Schema outputSchema(Schema input)
          Deprecated. Report the schema of the output of this UDF.
 String toString()
          Deprecated. Function to return argument of constructor as string.
 
Methods inherited from class org.apache.pig.EvalFunc
finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, isAsynchronous, progress, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

schemaName

protected Vector<String> schemaName
Deprecated. 
Constructor Detail

COR

public COR()
Deprecated. 

COR

public COR(String... schemaName)
Deprecated. 
Method Detail

exec

public DataBag exec(Tuple input)
             throws IOException
Deprecated. 
Function to compute correlation between data sets.

Specified by:
exec in class EvalFunc<DataBag>
Parameters:
input - input tuple which contains data sets.
output - output dataBag which contain correlation between each pair of data sets.
Returns:
result, of type T.
Throws:
IOException

toString

public String toString()
Deprecated. 
Function to return argument of constructor as string. It append ( and ) at starting and end or argument respectively. If default constructor is called is returns empty string.

Overrides:
toString in class Object
Returns:
argument of constructor

getInitial

public String getInitial()
Deprecated. 
Description copied from interface: Algebraic
Get the initial function.

Specified by:
getInitial in interface Algebraic
Returns:
A function name of f_init. f_init should be an eval func. The return type of f_init.exec() has to be Tuple

getIntermed

public String getIntermed()
Deprecated. 
Description copied from interface: Algebraic
Get the intermediate function.

Specified by:
getIntermed in interface Algebraic
Returns:
A function name of f_intermed. f_intermed should be an eval func. The return type of f_intermed.exec() has to be Tuple

getFinal

public String getFinal()
Deprecated. 
Description copied from interface: Algebraic
Get the final function.

Specified by:
getFinal in interface Algebraic
Returns:
A function name of f_final. f_final should be an eval func parametrized by the same datum as the eval func implementing this interface.

combine

protected static Tuple combine(DataBag values)
                        throws IOException
Deprecated. 
combine results of different data chunk

Parameters:
values - DataBag containing partial results computed on different data chunks
output - Tuple containing combined data
Throws:
IOException

computeAll

protected static Tuple computeAll(DataBag first,
                                  DataBag second)
Deprecated. 
compute sum(XY), sum(X), sum(Y), sum(XX), sum(YY) from given data sets

Parameters:
first - DataBag containing first data set
second - DataBag containing second data set
Returns:
tuple containing sum(XY), sum(X), sum(Y), sum(XX), sum(YY)

outputSchema

public Schema outputSchema(Schema input)
Deprecated. 
Description copied from class: EvalFunc
Report the schema of the output of this UDF. Pig will make use of this in error checking, optimization, and planning. The schema of input data to this UDF is provided.

The default implementation interprets the OutputSchema annotation, if one is present. Otherwise, it returns null (no known output schema).

Overrides:
outputSchema in class EvalFunc<DataBag>
Parameters:
input - Schema of the input
Returns:
Schema of the output


Copyright © 2007-2012 The Apache Software Foundation