You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by dv...@apache.org on 2012/05/30 03:42:59 UTC

svn commit: r1344073 - in /pig/branches/branch-0.10: CHANGES.txt src/org/apache/pig/builtin/PigStorage.java

Author: dvryaboy
Date: Wed May 30 01:42:58 2012
New Revision: 1344073

URL: http://svn.apache.org/viewvc?rev=1344073&view=rev
Log:
PIG-2727: PigStorage Source tagging does not need pig.splitCombination to be turned off

Modified:
    pig/branches/branch-0.10/CHANGES.txt
    pig/branches/branch-0.10/src/org/apache/pig/builtin/PigStorage.java

Modified: pig/branches/branch-0.10/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.10/CHANGES.txt?rev=1344073&r1=1344072&r2=1344073&view=diff
==============================================================================
--- pig/branches/branch-0.10/CHANGES.txt (original)
+++ pig/branches/branch-0.10/CHANGES.txt Wed May 30 01:42:58 2012
@@ -18,7 +18,18 @@
 
 Pig Change Log
 
-Release 0.10.0 - Unreleased
+Release 0.10.1
+
+INCOMPATIBLE CHANGES
+
+IMPROVEMENTS
+
+PIG-2727: PigStorage Source tagging does not need pig.splitCombination to be turned off (prkommireddi via dvryaboy)
+
+BUG FIXES
+
+
+Release 0.10.0
 
 INCOMPATIBLE CHANGES
 

Modified: pig/branches/branch-0.10/src/org/apache/pig/builtin/PigStorage.java
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.10/src/org/apache/pig/builtin/PigStorage.java?rev=1344073&r1=1344072&r2=1344073&view=diff
==============================================================================
--- pig/branches/branch-0.10/src/org/apache/pig/builtin/PigStorage.java (original)
+++ pig/branches/branch-0.10/src/org/apache/pig/builtin/PigStorage.java Wed May 30 01:42:58 2012
@@ -35,7 +35,6 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.compress.BZip2Codec;
 import org.apache.hadoop.io.compress.CompressionCodec;
-import org.apache.hadoop.io.compress.CompressionCodecFactory;
 import org.apache.hadoop.io.compress.GzipCodec;
 import org.apache.hadoop.mapreduce.InputFormat;
 import org.apache.hadoop.mapreduce.Job;
@@ -85,7 +84,7 @@ import org.apache.pig.parser.ParserExcep
  * <li><code>-schema</code> Reads/Stores the schema of the relation using a 
  *  hidden JSON file.
  * <li><code>-noschema</code> Ignores a stored schema during loading.
- * <li><code>-tagsource</code> Appends input source file path to end of each tuple. Make sure to set "pig.splitCombination" to false
+ * <li><code>-tagsource</code> Appends input source file path to beginning of each tuple.
  * </ul>
  * <p>
  * <h3>Schemas</h3>
@@ -104,8 +103,8 @@ import org.apache.pig.parser.ParserExcep
  * <h3>Source tagging</h3>
  * If<code>-tagsource</code> is specified, PigStorage will prepend input split path to each Tuple/row.
  * User needs to ensure <code>pig.splitCombination</code> is set to false. 
- * Usage: A = LOAD 'input' using PigStorage(',','-tagschema'); B = foreach A generate INPUT_FILE_NAME;
- * The first field in each Tuple will contain input path (INPUT_FILE_NAME)
+ * Usage: A = LOAD 'input' using PigStorage(',','-tagsource'); B = foreach A generate $0;
+ * The first field (0th index) in each Tuple will contain input path
  * <p>
  * Note that regardless of whether or not you store the schema, you <b>always</b> need to specify
  * the correct delimiter to read your data. If you store reading delimiter "#" and then load using
@@ -154,7 +153,7 @@ LoadPushDown, LoadMetadata, StoreMetadat
     private void populateValidOptions() {
         validOptions.addOption("schema", false, "Loads / Stores the schema of the relation using a hidden JSON file.");
         validOptions.addOption("noschema", false, "Disable attempting to load data schema from the filesystem.");
-        validOptions.addOption(TAG_SOURCE_PATH, false, "Appends input source file path to end of each tuple. Make sure to set pig.splitCombination to false");
+        validOptions.addOption(TAG_SOURCE_PATH, false, "Appends input source file path to beginning of each tuple. ");
     }
 
     public PigStorage() {
@@ -180,7 +179,7 @@ LoadPushDown, LoadMetadata, StoreMetadat
      * <ul>
      * <li><code>-schema</code> Loads / Stores the schema of the relation using a hidden JSON file.
      * <li><code>-noschema</code> Ignores a stored schema during loading.
-     * <li><code>-tagsource</code> Appends input source file path to end of each tuple. Make sure to set "pig.splitCombination" to false
+     * <li><code>-tagsource</code> Appends input source file path to beginning of each tuple.
      * </ul>
      * @param delimiter the single byte character that is used to separate fields.
      * @param options a list of options that can be used to modify PigStorage behavior