Author: gates
Date: Wed Jul 14 20:21:26 2010
New Revision: 964177

URL: http://svn.apache.org/viewvc?rev=964177&view=rev
Log:
Javadoc improvements for org.apache.pig.builtin package.

Modified:
    hadoop/pig/trunk/CHANGES.txt
    hadoop/pig/trunk/src/org/apache/pig/builtin/ARITY.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/AVG.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/BagSize.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/BinStorage.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/CONCAT.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/COUNT.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/COUNT_STAR.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/ConstantSize.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/DIFF.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/Distinct.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleAvg.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleMax.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleMin.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleSum.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/FloatAvg.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/FloatMax.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/FloatMin.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/FloatSum.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/IntAvg.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/IntMax.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/IntMin.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/IntSum.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/IsEmpty.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/LongAvg.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/LongMax.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/LongMin.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/LongSum.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/MAX.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/MIN.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/MapSize.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/PigStorage.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/RANDOM.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/SIZE.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/SUM.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/StringConcat.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/StringMax.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/StringMin.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/StringSize.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/TOKENIZE.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/TextLoader.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/TupleSize.java
    hadoop/pig/trunk/src/org/apache/pig/builtin/Utf8StorageConverter.java

Modified: hadoop/pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/CHANGES.txt?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/CHANGES.txt (original)
+++ hadoop/pig/trunk/CHANGES.txt Wed Jul 14 20:21:26 2010
@@ -100,6 +100,8 @@ PIG-1309: Map-side Cogroup (ashutoshc)
 
 BUG FIXES
 
+PIG-1409: Fix up javadocs for org.apache.pig.builtin (gates)
+
 PIG-1490: Make Pig storers work with remote HDFS in secure mode (rding)
 
 PIG-1469: DefaultDataBag assumes ArrayList as default List type (azaroth via 
dvryaboy)

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/ARITY.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/ARITY.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/ARITY.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/ARITY.java Wed Jul 14 20:21:26 
2010
@@ -26,6 +26,11 @@ import org.apache.pig.data.DataType;
 import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 
+/**
+ * Find the number of fields in a tuple.  Expected input is a tuple,
+ * output is an integer.
+ * @deprecated Use {...@link SIZE} instead.
+ */
 public class ARITY extends EvalFunc<Integer> {
 
     @Override

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/AVG.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/AVG.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/AVG.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/AVG.java Wed Jul 14 20:21:26 
2010
@@ -38,8 +38,21 @@ import org.apache.pig.backend.executione
 
 
 /**
- * Generates the average of the values of the first field of a tuple. This 
class is Algebraic in
- * implemenation, so if possible the execution will be split into a local and 
global application
+ * Generates the average of a set of values. This class implements
+ * {...@link org.apache.pig.Algebraic}, so if possible the execution will
+ * performed in a distributed fashion.
+ * <p>
+ * AVG can operate on any numeric type.  It can also operate on bytearrays,
+ * which it will cast to doubles.    It expects a bag of
+ * tuples of one record each.  If Pig knows from the schema that this function
+ * will be passed a bag of integers or longs, it will use a specially adapted 
version of
+ * AVG that uses integer arithmetic for summing the data.  The return type
+ * of AVG will always be double, regardless of the input type. 
+ * <p>
+ * AVG implements the {...@link org.apache.pig.Accumulator} interface as well.
+ * While this will never be
+ * the preferred method of usage it is available in case the combiner can not 
be
+ * used for a given calculation
  */
 public class AVG extends EvalFunc<Double> implements Algebraic, 
Accumulator<Double> {
     

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/BagSize.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/BagSize.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/BagSize.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/BagSize.java Wed Jul 14 
20:21:26 2010
@@ -28,7 +28,7 @@ import org.apache.pig.impl.logicalLayer.
 
 
 /**
- * Generates the size of the first field of a tuple.
+ * This method should never be used directly, use {...@link SIZE}.
  */
 public class BagSize extends EvalFunc<Long> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/BinStorage.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/BinStorage.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/BinStorage.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/BinStorage.java Wed Jul 14 
20:21:26 2010
@@ -66,6 +66,11 @@ import org.apache.pig.impl.io.ReadToEndL
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 import org.apache.pig.impl.util.LogUtils;
 
+/**
+ * Load and store data in a binary format.  This class is used by Pig to move
+ * data between MapReduce jobs.  Use of this function for storing user data is
+ * supported.
+ */
 public class BinStorage extends FileInputLoadFunc 
 implements LoadCaster, StoreFuncInterface, LoadMetadata {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/CONCAT.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/CONCAT.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/CONCAT.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/CONCAT.java Wed Jul 14 20:21:26 
2010
@@ -33,7 +33,8 @@ import org.apache.pig.impl.logicalLayer.
 
 
 /**
- * Generates the concatenation of the first two fields of a tuple.
+ * Generates the concatenation of the first two arguments.  It can be
+ * used with two bytearrays or two chararrays (but not a mixture of the two).
  */
 public class CONCAT extends EvalFunc<DataByteArray> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/COUNT.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/COUNT.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/COUNT.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/COUNT.java Wed Jul 14 20:21:26 
2010
@@ -33,8 +33,20 @@ import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 
 /**
- * Generates the count of the values of the first field of a tuple. This class 
is Algebraic in
- * implemenation, so if possible the execution will be split into a local and 
global functions
+ * Generates the count of the number of values in a bag.  This count does not
+ * include null values, and thus matches SQL semantics for COUNT(a) (where a is
+ * field) but not for COUNT(*) (where * in SQL indicates all).
+ * <p>
+ * This class
+ * implements {...@link org.apache.pig.Algebraic}, so if possible the 
execution will
+ * performed in a distributed fashion.
+ * <p>
+ * There are no restrictions as to the data types inside the bag to be counted.
+ * <p>
+ * COUNT implements the {...@link org.apache.pig.Accumulator} interface as 
well.
+ * While this will never be
+ * the preferred method of usage it is available in case the combiner can not 
be
+ * used for a given calculation.
  */
 public class COUNT extends EvalFunc<Long> implements Algebraic, 
Accumulator<Long>{
     private static TupleFactory mTupleFactory = TupleFactory.getInstance();

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/COUNT_STAR.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/COUNT_STAR.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/COUNT_STAR.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/COUNT_STAR.java Wed Jul 14 
20:21:26 2010
@@ -35,9 +35,24 @@ import org.apache.pig.impl.logicalLayer.
 /**
  * Generates the count of the values of the first field of a tuple. 
  * This class is different from COUNT in that it counts all NULL values and as 
such
- * implements SQL COUNT(*) semantics. This class is Algebraic in
- * implemenation, so if possible the execution will be split into a local and 
global functions
+ * implements SQL COUNT(*) semantics.
+ *
+ * Generates the count of the number of values in a bag.  This count does 
+ * include null values, and thus matches SQL semantics for COUNT(*) (where
+ * in SQL indicates all) but not for COUNT(a) (where a is * field).
+ * <p>
+ * This class
+ * implements {...@link org.apache.pig.Algebraic}, so if possible the 
execution will
+ * performed in a distributed fashion.
+ * <p>
+ * There are no restrictions as to the data types inside the bag to be counted.
+ * <p>
+ * COUNT_STAR implements the {...@link org.apache.pig.Accumulator} interface 
as well.
+ * While this will never be
+ * the preferred method of usage it is available in case the combiner can not 
be
+ * used for a given calculation.
  */
+
 public class COUNT_STAR extends EvalFunc<Long> implements Algebraic, 
Accumulator<Long>{
     private static TupleFactory mTupleFactory = TupleFactory.getInstance();
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/ConstantSize.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/ConstantSize.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/ConstantSize.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/ConstantSize.java Wed Jul 14 
20:21:26 2010
@@ -28,7 +28,7 @@ import org.apache.pig.impl.logicalLayer.
 
 
 /**
- * Generates the size of the first field of a tuple.
+ * This method should never be used directly, use {...@link SIZE}.
  */
 public class ConstantSize extends EvalFunc<Long> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/DIFF.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/DIFF.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/DIFF.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/DIFF.java Wed Jul 14 20:21:26 
2010
@@ -32,9 +32,14 @@ import org.apache.pig.data.TupleFactory;
 
 
 /**
- * DIFF compares the fields of a tuple with arity 2. If the fields are 
DataBags, it
- * will emit any Tuples that are in on of the DataBags but not the other. If 
the
- * fields are values, it will emit tuples with values that do not match.
+ * DIFF takes two bags as arguments and compares them.   Any tuples
+ * that are in one bag but not the other are returned.  If the
+ * fields are not bags then they will be returned if they do not match, or 
+ * an empty bag will be returned if the two records match.
+ * <p>
+ * The implementation assumes that both bags being passed to this function will
+ * fit entirely into memory simultaneously.  If that is not the case the UDF
+ * will still function, but it will be <strong>very</strong> slow.
  * 
  */
 public class DIFF extends EvalFunc<DataBag> {

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/Distinct.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/Distinct.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/Distinct.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/Distinct.java Wed Jul 14 
20:21:26 2010
@@ -34,8 +34,6 @@ import org.apache.pig.data.TupleFactory;
  * Find the distinct set of tuples in a bag.
  * This is a blocking operator. All the input is put in the hashset implemented
  * in DistinctDataBag which also provides the other DataBag interfaces.
- * 
- * 
  */
 public class Distinct  extends EvalFunc<DataBag> implements Algebraic {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleAvg.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleAvg.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleAvg.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleAvg.java Wed Jul 14 
20:21:26 2010
@@ -36,8 +36,7 @@ import org.apache.pig.backend.executione
 
 
 /**
- * Generates the average of the values of the first field of a tuple. This 
class is Algebraic in
- * implemenation, so if possible the execution will be split into a local and 
global application
+ * This method should never be used directly, use {...@link AVG}.
  */
 public class DoubleAvg extends EvalFunc<Double> implements Algebraic, 
Accumulator<Double> {
     

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleMax.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleMax.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleMax.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleMax.java Wed Jul 14 
20:21:26 2010
@@ -33,7 +33,7 @@ import org.apache.pig.impl.logicalLayer.
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 
 /**
- * Generates the max of the values of the first field of a tuple.
+ * This method should never be used directly, use {...@link MAX}.
  */
 public class DoubleMax extends EvalFunc<Double> implements Algebraic, 
Accumulator<Double> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleMin.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleMin.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleMin.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleMin.java Wed Jul 14 
20:21:26 2010
@@ -32,7 +32,7 @@ import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 
 /**
- * Generates the min of the Double values in the first field of a tuple.
+ * This method should never be used directly, use {...@link MIN}.
  */
 public class DoubleMin extends EvalFunc<Double> implements Algebraic, 
Accumulator<Double> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleSum.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleSum.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleSum.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/DoubleSum.java Wed Jul 14 
20:21:26 2010
@@ -36,7 +36,7 @@ import org.apache.pig.impl.logicalLayer.
 
 
 /**
- * Generates the sum of the values of the first field of a tuple.
+ * This method should never be used directly, use {...@link SUM}.
  */
 public class DoubleSum extends EvalFunc<Double> implements Algebraic, 
Accumulator<Double> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/FloatAvg.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/FloatAvg.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/FloatAvg.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/FloatAvg.java Wed Jul 14 
20:21:26 2010
@@ -33,8 +33,7 @@ import org.apache.pig.backend.executione
 
 
 /**
- * Generates the average of the values of the first field of a tuple. This 
class is Algebraic in
- * implementation, so if possible the execution will be split into a local and 
global application
+ * This method should never be used directly, use {...@link AVG}.
  */
 public class FloatAvg extends EvalFunc<Double> implements Algebraic, 
Accumulator<Double> {
     

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/FloatMax.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/FloatMax.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/FloatMax.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/FloatMax.java Wed Jul 14 
20:21:26 2010
@@ -32,7 +32,7 @@ import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 
 /**
- * Generates the max of the values of the first field of a tuple.
+ * This method should never be used directly, use {...@link MAX}.
  */
 public class FloatMax extends EvalFunc<Float> implements Algebraic, 
Accumulator<Float> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/FloatMin.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/FloatMin.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/FloatMin.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/FloatMin.java Wed Jul 14 
20:21:26 2010
@@ -32,7 +32,7 @@ import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 
 /**
- * Generates the min of the Float values in the first field of a tuple.
+ * This method should never be used directly, use {...@link MIN}.
  */
 public class FloatMin extends EvalFunc<Float> implements Algebraic, 
Accumulator<Float> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/FloatSum.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/FloatSum.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/FloatSum.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/FloatSum.java Wed Jul 14 
20:21:26 2010
@@ -33,7 +33,7 @@ import org.apache.pig.impl.logicalLayer.
 
 
 /**
- * Generates the sum of the Float values in the first field of a tuple.
+ * This method should never be used directly, use {...@link SUM}.
  */
 public class FloatSum extends EvalFunc<Double> implements Algebraic, 
Accumulator<Double>{
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/IntAvg.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/IntAvg.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/IntAvg.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/IntAvg.java Wed Jul 14 20:21:26 
2010
@@ -33,8 +33,7 @@ import org.apache.pig.backend.executione
 
 
 /**
- * Generates the average of the values of the first field of a tuple. This 
class is Algebraic in
- * implementation, so if possible the execution will be split into a local and 
global application
+ * This method should never be used directly, use {...@link AVG}.
  */
 public class IntAvg extends EvalFunc<Double> implements Algebraic, 
Accumulator<Double> {
     

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/IntMax.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/IntMax.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/IntMax.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/IntMax.java Wed Jul 14 20:21:26 
2010
@@ -32,7 +32,7 @@ import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 
 /**
- * Generates the max of the values of the first field of a tuple.
+ * This method should never be used directly, use {...@link MAX}.
  */
 public class IntMax extends EvalFunc<Integer> implements Algebraic, 
Accumulator<Integer> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/IntMin.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/IntMin.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/IntMin.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/IntMin.java Wed Jul 14 20:21:26 
2010
@@ -34,7 +34,7 @@ import org.apache.pig.impl.logicalLayer.
 
 
 /**
- * Generates the min of the Integer values in the first field of a tuple.
+ * This method should never be used directly, use {...@link MIN}.
  */
 public class IntMin extends EvalFunc<Integer> implements Algebraic, 
Accumulator<Integer> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/IntSum.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/IntSum.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/IntSum.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/IntSum.java Wed Jul 14 20:21:26 
2010
@@ -32,7 +32,7 @@ import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 
 /**
- * Generates the sum of the Integer in the first field of a tuple.
+ * This method should never be used directly, use {...@link SUM}.
  */
 public class IntSum extends EvalFunc<Long> implements Algebraic, 
Accumulator<Long> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/IsEmpty.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/IsEmpty.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/IsEmpty.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/IsEmpty.java Wed Jul 14 
20:21:26 2010
@@ -28,6 +28,9 @@ import org.apache.pig.data.Tuple;
 import org.apache.pig.data.DataType;
 
 
+/**
+ * Determine whether a bag or map is empty.
+ */
 public class IsEmpty extends FilterFunc {
 
     @Override

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/LongAvg.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/LongAvg.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/LongAvg.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/LongAvg.java Wed Jul 14 
20:21:26 2010
@@ -33,8 +33,7 @@ import org.apache.pig.backend.executione
 
 
 /**
- * Generates the average of the values of the first field of a tuple. This 
class is Algebraic in
- * implementation, so if possible the execution will be split into a local and 
global application
+ * This method should never be used directly, use {...@link AVG}.
  */
 public class LongAvg extends EvalFunc<Double> implements Algebraic, 
Accumulator<Double> {
     

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/LongMax.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/LongMax.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/LongMax.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/LongMax.java Wed Jul 14 
20:21:26 2010
@@ -32,7 +32,7 @@ import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 
 /**
- * Generates the max of the values of the first field of a tuple.
+ * This method should never be used directly, use {...@link MAX}.
  */
 public class LongMax extends EvalFunc<Long> implements Algebraic, 
Accumulator<Long> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/LongMin.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/LongMin.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/LongMin.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/LongMin.java Wed Jul 14 
20:21:26 2010
@@ -32,7 +32,7 @@ import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 
 /**
- * Generates the min of the Long values in the first field of a tuple.
+ * This method should never be used directly, use {...@link MIN}.
  */
 public class LongMin extends EvalFunc<Long> implements Algebraic, 
Accumulator<Long> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/LongSum.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/LongSum.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/LongSum.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/LongSum.java Wed Jul 14 
20:21:26 2010
@@ -33,7 +33,7 @@ import org.apache.pig.impl.logicalLayer.
 
 
 /**
- * Generates the sum of the Long values in the first field of a tuple.
+ * This method should never be used directly, use {...@link SUM}.
  */
 public class LongSum extends EvalFunc<Long> implements Algebraic, 
Accumulator<Long> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/MAX.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/MAX.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/MAX.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/MAX.java Wed Jul 14 20:21:26 
2010
@@ -38,7 +38,21 @@ import org.apache.pig.impl.logicalLayer.
 
 
 /**
- * Generates the max of the values of the first field of a tuple.
+ * Generates the maximum of a set of values. This class implements
+ * {...@link org.apache.pig.Algebraic}, so if possible the execution will
+ * performed in a distributed fashion.
+ * <p>
+ * MAX can operate on any numeric type and on chararrays.  It can also operate 
on bytearrays,
+ * which it will cast to doubles.    It expects a bag of
+ * tuples of one record each.  If Pig knows from the schema that this function
+ * will be passed a bag of integers or longs, it will use a specially adapted 
version of
+ * MAX that uses integer arithmetic for comparing the data.  The return type
+ * of MAX will match the input type.
+ * <p>
+ * MAX implements the {...@link org.apache.pig.Accumulator} interface as well.
+ * While this will never be
+ * the preferred method of usage it is available in case the combiner can not 
be
+ * used for a given calculation.
  */
 public class MAX extends EvalFunc<Double> implements Algebraic, 
Accumulator<Double> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/MIN.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/MIN.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/MIN.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/MIN.java Wed Jul 14 20:21:26 
2010
@@ -38,7 +38,21 @@ import org.apache.pig.impl.logicalLayer.
 
 
 /**
- * Generates the min of the values of the first field of a tuple.
+ * Generates the minimum of a set of values. This class implements
+ * {...@link org.apache.pig.Algebraic}, so if possible the execution will
+ * performed in a distributed fashion.
+ * <p>
+ * MIN can operate on any numeric type and on chararrays.  It can also operate 
on bytearrays,
+ * which it will cast to doubles.    It expects a bag of
+ * tuples of one record each.  If Pig knows from the schema that this function
+ * will be passed a bag of integers or longs, it will use a specially adapted 
version of
+ * MIN that uses integer arithmetic for comparing the data.  The return type
+ * of MIN will match the input type.
+ * <p>
+ * MIN implements the {...@link org.apache.pig.Accumulator} interface as well.
+ * While this will never be
+ * the preferred method of usage it is available in case the combiner can not 
be
+ * used for a given calculation.
  */
 public class MIN extends EvalFunc<Double> implements Algebraic, 
Accumulator<Double> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/MapSize.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/MapSize.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/MapSize.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/MapSize.java Wed Jul 14 
20:21:26 2010
@@ -29,7 +29,7 @@ import org.apache.pig.impl.logicalLayer.
 
 
 /**
- * Generates the size of the first field of a tuple.
+ * This method should never be used directly, use {...@link SIZE}.
  */
 public class MapSize extends EvalFunc<Long> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/PigStorage.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/PigStorage.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/PigStorage.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/PigStorage.java Wed Jul 14 
20:21:26 2010
@@ -57,9 +57,10 @@ import org.apache.pig.impl.util.StorageU
 import org.apache.pig.impl.util.UDFContext;
 
 /**
- * A load function that parses a line of input into fields using a delimiter 
to set the fields. The
- * delimiter is given as a regular expression. See String.split(delimiter) and
- * http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html for 
more information.
+ * A load function that parses a line of input into fields using a delimiter to
+ * set the fields. The delimiter is given as a regular expression. See
+ * {...@link java.lang.String#split(String)} and {...@link 
java.util.regex.Pattern}
+ * for more information.
  */
 @SuppressWarnings("unchecked")
 public class PigStorage extends FileInputLoadFunc implements 
StoreFuncInterface, 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/RANDOM.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/RANDOM.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/RANDOM.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/RANDOM.java Wed Jul 14 20:21:26 
2010
@@ -25,6 +25,10 @@ import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 import org.apache.pig.data.DataType;
 
+/**
+ * Return a random double value.  Whatever arguments are passed to this UDF
+ * are ignored.
+ */
 public class RANDOM extends EvalFunc<Double>{
 
        public Double exec(Tuple input) throws IOException {

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/SIZE.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/SIZE.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/SIZE.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/SIZE.java Wed Jul 14 20:21:26 
2010
@@ -33,7 +33,11 @@ import org.apache.pig.impl.logicalLayer.
 
 
 /**
- * Generates the Size of the first field of a tuple.
+ * Generates the size of the argument passed to it.  For bytearrays this
+ * means the number of bytes.  For charrays the number of characters.  For
+ * bags the number of tuples, for tuples the number of fields, and for maps
+ * the number of keyvalue pairs.  For all other types the value of 1 is
+ * always returned.
  */
 public class SIZE extends EvalFunc<Long> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/SUM.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/SUM.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/SUM.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/SUM.java Wed Jul 14 20:21:26 
2010
@@ -38,7 +38,22 @@ import org.apache.pig.impl.logicalLayer.
 
 
 /**
- * Generates the sum of the values of the first field of a tuple.
+ * Generates the sum of a set of values. This class implements
+ * {...@link org.apache.pig.Algebraic}, so if possible the execution will
+ * performed in a distributed fashion.
+ * <p>
+ * SUM can operate on any numeric type.  It can also operate on bytearrays,
+ * which it will cast to doubles.  It expects a bag of
+ * tuples of one record each.  If Pig knows from the schema that this function
+ * will be passed a bag of integers or longs, it will use a specially adapted 
version of
+ * SUM that uses integer arithmetic for summing the data.  The return type
+ * of SUM is double for float, double, or bytearray arguments and long for int
+ * or long arguments.
+ * <p>
+ * SUM implements the {...@link org.apache.pig.Accumulator} interface as well.
+ * While this will never be
+ * the preferred method of usage it is available in case the combiner can not 
be
+ * used for a given calculation.
  */
 public class SUM extends EvalFunc<Double> implements Algebraic, 
Accumulator<Double> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/StringConcat.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/StringConcat.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/StringConcat.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/StringConcat.java Wed Jul 14 
20:21:26 2010
@@ -27,7 +27,7 @@ import org.apache.pig.impl.logicalLayer.
 
 
 /**
- * Generates the concatenation of all fields of a tuple.
+ * This method should never be used directly, use {...@link CONCAT}.
  */
 public class StringConcat extends EvalFunc<String> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/StringMax.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/StringMax.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/StringMax.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/StringMax.java Wed Jul 14 
20:21:26 2010
@@ -32,7 +32,7 @@ import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 
 /**
- * Generates the max of the values of the first field of a tuple.
+ * This method should never be used directly, use {...@link MAX}.
  */
 public class StringMax extends EvalFunc<String> implements Algebraic, 
Accumulator<String> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/StringMin.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/StringMin.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/StringMin.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/StringMin.java Wed Jul 14 
20:21:26 2010
@@ -33,7 +33,7 @@ import org.apache.pig.impl.logicalLayer.
 
 
 /**
- * Generates the min of the String values in the first field of a tuple.
+ * This method should never be used directly, use {...@link MIN}.
  */
 public class StringMin extends EvalFunc<String> implements Algebraic, 
Accumulator<String> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/StringSize.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/StringSize.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/StringSize.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/StringSize.java Wed Jul 14 
20:21:26 2010
@@ -27,7 +27,7 @@ import org.apache.pig.impl.logicalLayer.
 
 
 /**
- * Generates the size of the first field of a tuple.
+ * This method should never be used directly, use {...@link SIZE}.
  */
 public class StringSize extends EvalFunc<Long> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/TOKENIZE.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/TOKENIZE.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/TOKENIZE.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/TOKENIZE.java Wed Jul 14 
20:21:26 2010
@@ -34,6 +34,12 @@ import org.apache.pig.impl.logicalLayer.
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 import org.apache.pig.FuncSpec;
 
+/**
+ * Given a chararray as an argument, this method will split the chararray and
+ * return a bag with a tuple for each chararray that results from the split.
+ * The string is split on space, double quote, comma, open parend, close 
parend,
+ * and asterisk (star).
+ */
 public class TOKENIZE extends EvalFunc<DataBag> {
     TupleFactory mTupleFactory = TupleFactory.getInstance();
     BagFactory mBagFactory = BagFactory.getInstance();

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/TextLoader.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/TextLoader.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/TextLoader.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/TextLoader.java Wed Jul 14 
20:21:26 2010
@@ -40,7 +40,8 @@ import org.apache.pig.data.TupleFactory;
 
 
 /**
- * This load function simply creates a tuple for each line of text that has a 
single field that
+ * This load function simply creates a tuple for each line of text that has a
+ * single chararray field that
  * contains the line of text.
  */
 public class TextLoader extends LoadFunc implements LoadCaster {

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/TupleSize.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/TupleSize.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/TupleSize.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/TupleSize.java Wed Jul 14 
20:21:26 2010
@@ -26,7 +26,7 @@ import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 
 /**
- * Generates the size of the first field of a tuple.
+ * This method should never be used directly, use {...@link SIZE}.
  */
 public class TupleSize extends EvalFunc<Long> {
 

Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/Utf8StorageConverter.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/Utf8StorageConverter.java?rev=964177&r1=964176&r2=964177&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/Utf8StorageConverter.java 
(original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/Utf8StorageConverter.java Wed 
Jul 14 20:21:26 2010
@@ -43,7 +43,7 @@ import org.apache.pig.impl.util.LogUtils
 /**
  * This abstract class provides standard conversions between utf8 encoded data
  * and pig data types.  It is intended to be extended by load and store
- * functions (such as PigStorage). 
+ * functions (such as {...@link PigStorage}). 
  */
 public class Utf8StorageConverter implements LoadCaster {
 


Reply via email to