Author: pradeepkth
Date: Thu Dec 24 22:58:33 2009
New Revision: 893817

URL: http://svn.apache.org/viewvc?rev=893817&view=rev
Log:
PIG-1090: Update sources to reflect recent changes in load-store interfaces - 
incremental commit to remove dead code (rding via pradeepkth)

Modified:
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/datastorage/HDirectory.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/local/datastorage/LocalDir.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/local/datastorage/LocalFile.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/ARITY.java
    hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/AVG.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/COUNT.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/COUNT_STAR.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/Distinct.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/DoubleSum.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/FloatSum.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/IntSum.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/LongSum.java
    hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/MAX.java
    hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/MIN.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/StringMin.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/TupleSize.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/PigContext.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/io/FileLocalizer.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/logicalLayer/LOLoad.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/util/ObjectSerializer.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/util/WrappedIOException.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/tools/grunt/GruntParser.java
    
hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/RegexGroupCount.java

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/datastorage/HDirectory.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/datastorage/HDirectory.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/datastorage/HDirectory.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/datastorage/HDirectory.java
 Thu Dec 24 22:58:33 2009
@@ -29,7 +29,6 @@
 import org.apache.hadoop.fs.FileStatus;
 
 import org.apache.pig.backend.datastorage.*;
-import org.apache.pig.impl.util.WrappedIOException;
 
 public class HDirectory extends HPath
                         implements ContainerDescriptor {
@@ -113,7 +112,7 @@
             }
         }
         catch (DataStorageException e) {
-            throw WrappedIOException.wrap("Failed to copy " + this + " to " + 
dstName, e);
+            throw new IOException("Failed to copy " + this + " to " + dstName, 
e);
         }
 
         if (removeSrc) {

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/local/datastorage/LocalDir.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/local/datastorage/LocalDir.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/local/datastorage/LocalDir.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/local/datastorage/LocalDir.java
 Thu Dec 24 22:58:33 2009
@@ -31,7 +31,6 @@
 import org.apache.pig.backend.datastorage.DataStorageException;
 import org.apache.pig.backend.datastorage.ImmutableOutputStream;
 import org.apache.pig.backend.datastorage.SeekableInputStream;
-import org.apache.pig.impl.util.WrappedIOException;
 
 public class LocalDir extends LocalPath
                       implements ContainerDescriptor {
@@ -83,7 +82,7 @@
             }
         }
         catch (DataStorageException e) {
-            throw WrappedIOException.wrap("Failed to get container for " + 
dstName.toString(), e);
+            throw new IOException("Failed to get container for " + 
dstName.toString(), e);
         }
 
         copy((ContainerDescriptor) dstName,
@@ -139,7 +138,7 @@
             }
         }
         catch (DataStorageException e) {
-            throw WrappedIOException.wrap("Failed to copy " + this + " to " + 
dstName, e);
+            throw new IOException("Failed to copy " + this + " to " + dstName, 
e);
         }
 
         if (removeSrc) {

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/local/datastorage/LocalFile.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/local/datastorage/LocalFile.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/local/datastorage/LocalFile.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/local/datastorage/LocalFile.java
 Thu Dec 24 22:58:33 2009
@@ -19,16 +19,18 @@
 package org.apache.pig.backend.local.datastorage;
 
 import java.io.File;
-import java.io.IOException;
+import java.io.FileInputStream;
 import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.io.FileOutputStream;
-import java.io.FileInputStream;
 import java.util.Properties;
 
-import org.apache.pig.backend.datastorage.*;
-import org.apache.pig.impl.util.WrappedIOException;
+import org.apache.pig.backend.datastorage.ContainerDescriptor;
+import org.apache.pig.backend.datastorage.DataStorageException;
+import org.apache.pig.backend.datastorage.ElementDescriptor;
+import org.apache.pig.backend.datastorage.SeekableInputStream;
 
 public class LocalFile extends LocalPath {
 
@@ -90,7 +92,7 @@
                                                 path.getName());
                 }
                 catch (DataStorageException e) {
-                    throw WrappedIOException.wrap("Unable to generate element 
name (src: " + 
+                    throw new IOException("Unable to generate element name 
(src: " + 
                                            this + ", dst: " + dstName + ")", 
e);
                 }
             }
@@ -132,7 +134,7 @@
             return new LocalSeekableInputStream(this.path);
         }
         catch (FileNotFoundException e) {
-            throw WrappedIOException.wrap("Unable to find " + this.path, e);
+            throw new IOException("Unable to find " + this.path, e);
         }
     }
 }

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/ARITY.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/ARITY.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/ARITY.java 
(original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/ARITY.java 
Thu Dec 24 22:58:33 2009
@@ -25,7 +25,6 @@
 import org.apache.pig.data.DataType;
 import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
-import org.apache.pig.impl.util.WrappedIOException;
 
 public class ARITY extends EvalFunc<Integer> {
 

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/AVG.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/AVG.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/AVG.java 
(original)
+++ hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/AVG.java 
Thu Dec 24 22:58:33 2009
@@ -34,7 +34,6 @@
 import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.FrontendException;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
-import org.apache.pig.impl.util.WrappedIOException;
 import org.apache.pig.backend.executionengine.ExecException;
 
 

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/COUNT.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/COUNT.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/COUNT.java 
(original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/COUNT.java 
Thu Dec 24 22:58:33 2009
@@ -31,7 +31,6 @@
 import org.apache.pig.data.Tuple;
 import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
-import org.apache.pig.impl.util.WrappedIOException;
 
 /**
  * Generates the count of the values of the first field of a tuple. This class 
is Algebraic in

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/COUNT_STAR.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/COUNT_STAR.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/COUNT_STAR.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/COUNT_STAR.java
 Thu Dec 24 22:58:33 2009
@@ -31,7 +31,6 @@
 import org.apache.pig.data.Tuple;
 import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
-import org.apache.pig.impl.util.WrappedIOException;
 
 /**
  * Generates the count of the values of the first field of a tuple. 

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/Distinct.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/Distinct.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/Distinct.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/Distinct.java
 Thu Dec 24 22:58:33 2009
@@ -29,7 +29,6 @@
 import org.apache.pig.data.InternalDistinctBag;
 import org.apache.pig.data.Tuple;
 import org.apache.pig.data.TupleFactory;
-import org.apache.pig.impl.util.WrappedIOException;
 
 /**
  * Find the distinct set of tuples in a bag.

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/DoubleSum.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/DoubleSum.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/DoubleSum.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/DoubleSum.java
 Thu Dec 24 22:58:33 2009
@@ -33,7 +33,6 @@
 import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.FrontendException;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
-import org.apache.pig.impl.util.WrappedIOException;
 
 
 /**

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/FloatSum.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/FloatSum.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/FloatSum.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/FloatSum.java
 Thu Dec 24 22:58:33 2009
@@ -30,7 +30,6 @@
 import org.apache.pig.data.Tuple;
 import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
-import org.apache.pig.impl.util.WrappedIOException;
 
 
 /**

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/IntSum.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/IntSum.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/IntSum.java 
(original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/IntSum.java 
Thu Dec 24 22:58:33 2009
@@ -30,7 +30,6 @@
 import org.apache.pig.data.Tuple;
 import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
-import org.apache.pig.impl.util.WrappedIOException;
 
 /**
  * Generates the sum of the Integer in the first field of a tuple.

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/LongSum.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/LongSum.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/LongSum.java 
(original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/LongSum.java 
Thu Dec 24 22:58:33 2009
@@ -30,7 +30,6 @@
 import org.apache.pig.data.Tuple;
 import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
-import org.apache.pig.impl.util.WrappedIOException;
 
 
 /**

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/MAX.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/MAX.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/MAX.java 
(original)
+++ hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/MAX.java 
Thu Dec 24 22:58:33 2009
@@ -35,7 +35,6 @@
 import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.FrontendException;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
-import org.apache.pig.impl.util.WrappedIOException;
 
 
 /**

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/MIN.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/MIN.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/MIN.java 
(original)
+++ hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/MIN.java 
Thu Dec 24 22:58:33 2009
@@ -35,7 +35,6 @@
 import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.FrontendException;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
-import org.apache.pig.impl.util.WrappedIOException;
 
 
 /**

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/StringMin.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/StringMin.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/StringMin.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/StringMin.java
 Thu Dec 24 22:58:33 2009
@@ -30,7 +30,6 @@
 import org.apache.pig.data.Tuple;
 import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
-import org.apache.pig.impl.util.WrappedIOException;
 
 
 /**

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/TupleSize.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/TupleSize.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/TupleSize.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/builtin/TupleSize.java
 Thu Dec 24 22:58:33 2009
@@ -24,7 +24,6 @@
 import org.apache.pig.data.DataType;
 import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
-import org.apache.pig.impl.util.WrappedIOException;
 
 /**
  * Generates the size of the first field of a tuple.

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/PigContext.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/PigContext.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/PigContext.java 
(original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/PigContext.java 
Thu Dec 24 22:58:33 2009
@@ -18,9 +18,7 @@
 package org.apache.pig.impl;
 
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.Serializable;
 import java.lang.reflect.Constructor;
 import java.net.MalformedURLException;
@@ -28,7 +26,7 @@
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;
-import java.util.Collections;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
@@ -36,16 +34,14 @@
 import java.util.Properties;
 import java.util.StringTokenizer;
 import java.util.Vector;
-import java.util.Arrays;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.log4j.Level;
+import org.apache.pig.ExecType;
 import org.apache.pig.FuncSpec;
 import org.apache.pig.Main;
-import org.apache.pig.ExecType;
 import org.apache.pig.PigException;
 import org.apache.pig.backend.datastorage.DataStorage;
 import org.apache.pig.backend.datastorage.DataStorageException;
@@ -54,16 +50,11 @@
 import org.apache.pig.backend.executionengine.ExecutionEngine;
 import org.apache.pig.backend.hadoop.datastorage.HDataStorage;
 import org.apache.pig.backend.hadoop.executionengine.HExecutionEngine;
-//import 
org.apache.pig.backend.hadoop.executionengine.mapreduceExec.MapReduceLauncher;
-//import 
org.apache.pig.backend.hadoop.executionengine.mapreduceExec.PigMapReduce;
-import org.apache.pig.backend.local.executionengine.LocalExecutionEngine;
-import 
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher;
 import org.apache.pig.backend.hadoop.streaming.HadoopExecutableManager;
 import org.apache.pig.impl.logicalLayer.LogicalPlanBuilder;
 import org.apache.pig.impl.streaming.ExecutableManager;
 import org.apache.pig.impl.streaming.StreamingCommand;
 import org.apache.pig.impl.util.JarManager;
-import org.apache.pig.impl.util.WrappedIOException;
 
 public class PigContext implements Serializable, FunctionInstantiator {
     private static final long serialVersionUID = 1L;

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/io/FileLocalizer.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/io/FileLocalizer.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/io/FileLocalizer.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/io/FileLocalizer.java
 Thu Dec 24 22:58:33 2009
@@ -46,7 +46,6 @@
 import org.apache.pig.backend.hadoop.datastorage.HDataStorage;
 import 
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce;
 import org.apache.pig.impl.PigContext;
-import org.apache.pig.impl.util.WrappedIOException;
 
 public class FileLocalizer {
     private static final Log log = LogFactory.getLog(FileLocalizer.class);
@@ -207,7 +206,7 @@
                 }
             }
             catch (DataStorageException e) {
-                throw WrappedIOException.wrap("Failed to determine if elem=" + 
elem + " is container", e);
+                throw new IOException("Failed to determine if elem=" + elem + 
" is container", e);
             }
             
             // elem is a directory - recursively get all files in it
@@ -364,7 +363,7 @@
                 return sis;
             }
             catch (DataStorageException e) {
-                throw WrappedIOException.wrap("Failed to determine if elem=" + 
elem + " is container", e);
+                throw new IOException("Failed to determine if elem=" + elem + 
" is container", e);
             }
         }
         // Either a directory or a glob.

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/logicalLayer/LOLoad.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/logicalLayer/LOLoad.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/logicalLayer/LOLoad.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/logicalLayer/LOLoad.java
 Thu Dec 24 22:58:33 2009
@@ -18,15 +18,12 @@
 package org.apache.pig.impl.logicalLayer;
 
 import java.io.IOException;
-import java.net.URL;
 import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Map;
-import java.util.Set;
 import java.util.TreeSet;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.pig.ExecType;
 import org.apache.pig.LoadFunc;
 import org.apache.pig.LoadMetadata;
@@ -41,21 +38,14 @@
 import org.apache.pig.data.DataType;
 import org.apache.pig.impl.PigContext;
 import org.apache.pig.impl.io.FileSpec;
+import org.apache.pig.impl.logicalLayer.schema.Schema;
+import org.apache.pig.impl.logicalLayer.schema.SchemaMergeException;
 import org.apache.pig.impl.plan.OperatorKey;
 import org.apache.pig.impl.plan.ProjectionMap;
 import org.apache.pig.impl.plan.RequiredFields;
 import org.apache.pig.impl.plan.VisitorException;
-import org.apache.pig.impl.plan.optimizer.OptimizerException;
 import org.apache.pig.impl.util.MultiMap;
 import org.apache.pig.impl.util.Pair;
-import org.apache.pig.impl.util.PropertiesUtil;
-import org.apache.pig.impl.util.WrappedIOException;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
-import org.apache.pig.impl.logicalLayer.schema.Schema;
-import org.apache.pig.impl.logicalLayer.schema.SchemaMergeException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.mapreduce.Job;
 
 public class LOLoad extends RelationalOperator {
     private static final long serialVersionUID = 2L;
@@ -103,10 +93,10 @@
                   
PigContext.instantiateFuncFromSpec(inputFileSpec.getFuncSpec());
         }catch (ClassCastException cce) {
             log.error(inputFileSpec.getFuncSpec() + " should implement the 
LoadFunc interface.");
-            throw WrappedIOException.wrap(cce);
+            throw new IOException(cce);
         }
          catch (Exception e){ 
-             throw WrappedIOException.wrap(e);
+             throw new IOException(e);
         }
     }
 

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/util/ObjectSerializer.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/util/ObjectSerializer.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/util/ObjectSerializer.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/util/ObjectSerializer.java
 Thu Dec 24 22:58:33 2009
@@ -41,7 +41,7 @@
             objStream.close();
             return encodeBytes(serialObj.toByteArray());
         } catch (Exception e) {
-            throw WrappedIOException.wrap("Serialization error: " + 
e.getMessage(), e);
+            throw new IOException("Serialization error: " + e.getMessage(), e);
         }
     }
     
@@ -52,7 +52,7 @@
             ObjectInputStream objStream = new ObjectInputStream(serialObj);
             return objStream.readObject();
         } catch (Exception e) {
-            throw WrappedIOException.wrap("Deserialization error: " + 
e.getMessage(), e);
+            throw new IOException("Deserialization error: " + e.getMessage(), 
e);
         }
     }
     

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/util/WrappedIOException.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/util/WrappedIOException.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/util/WrappedIOException.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/impl/util/WrappedIOException.java
 Thu Dec 24 22:58:33 2009
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.pig.impl.util;
-
-import java.io.IOException;
-
-/**
- * FIXME PIG-80 replace this code when pig will be java 6 compliant with "throw
- * new IOException(e);"
- */
-public class WrappedIOException {
-
-    public static IOException wrap(final Throwable e) {
-        return wrap(e.getMessage(), e);
-    }
-    
-    public static IOException wrap(final String message, final Throwable e) {
-        final IOException wrappedException = new IOException(message + " [" +
-            e.getMessage() + "]");
-        wrappedException.setStackTrace(e.getStackTrace());
-        wrappedException.initCause(e);
-        return wrappedException;
-    }
-}

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/tools/grunt/GruntParser.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/tools/grunt/GruntParser.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/tools/grunt/GruntParser.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/tools/grunt/GruntParser.java
 Thu Dec 24 22:58:33 2009
@@ -17,30 +17,25 @@
  */
 package org.apache.pig.tools.grunt;
 
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
 import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.Reader;
-import java.io.FileReader;
-import java.io.FileInputStream;
-import java.io.OutputStreamWriter;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.FileWriter;
-import java.io.FileOutputStream;
 import java.io.InputStreamReader;
-import java.io.FileNotFoundException;
+import java.io.OutputStreamWriter;
+import java.io.PrintStream;
+import java.io.Reader;
 import java.io.StringReader;
 import java.io.StringWriter;
+import java.util.Date;
 import java.util.Iterator;
-import java.util.Map;
 import java.util.List;
-import java.util.ArrayList;
+import java.util.Map;
 import java.util.Properties;
-import java.util.Date;
-import java.io.ByteArrayOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.PrintStream;
 
 import jline.ConsoleReader;
 import jline.ConsoleReaderInputStream;
@@ -49,27 +44,24 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.fs.FsShell;
 import org.apache.hadoop.mapred.JobClient;
-import org.apache.hadoop.mapred.RunningJob;
 import org.apache.hadoop.mapred.JobID;
-import org.apache.pig.FuncSpec;
+import org.apache.hadoop.mapred.RunningJob;
 import org.apache.pig.PigServer;
 import org.apache.pig.backend.datastorage.ContainerDescriptor;
 import org.apache.pig.backend.datastorage.DataStorage;
 import org.apache.pig.backend.datastorage.DataStorageException;
 import org.apache.pig.backend.datastorage.ElementDescriptor;
+import org.apache.pig.backend.executionengine.ExecJob;
 import org.apache.pig.backend.executionengine.ExecutionEngine;
 import org.apache.pig.backend.hadoop.datastorage.ConfigurationUtil;
 import org.apache.pig.backend.hadoop.executionengine.HExecutionEngine;
-import org.apache.pig.backend.executionengine.ExecJob;
-import org.apache.pig.backend.executionengine.ExecJob.JOB_STATUS;
 import org.apache.pig.data.Tuple;
+import org.apache.pig.impl.util.LogUtils;
 import org.apache.pig.impl.util.TupleFormat;
-import org.apache.pig.impl.util.WrappedIOException;
+import org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor;
 import org.apache.pig.tools.pigscript.parser.ParseException;
 import org.apache.pig.tools.pigscript.parser.PigScriptParser;
 import org.apache.pig.tools.pigscript.parser.PigScriptParserTokenManager;
-import org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor;
-import org.apache.pig.impl.util.LogUtils;
 
 public class GruntParser extends PigScriptParser {
 
@@ -499,7 +491,7 @@
             }
         }
         catch (DataStorageException e) {
-            throw WrappedIOException.wrap("Failed to Cat: " + path, e);
+            throw new IOException("Failed to Cat: " + path, e);
         }
     }
 
@@ -528,7 +520,7 @@
             }
         }
         catch (DataStorageException e) {
-            throw WrappedIOException.wrap("Failed to change working directory 
to " + 
+            throw new IOException("Failed to change working directory to " + 
                                   ((path == null) ? ("/user/" + 
System.getProperty("user.name")) 
                                                      : (path)), e);
         }
@@ -598,7 +590,7 @@
             }
         }
         catch (DataStorageException e) {
-            throw WrappedIOException.wrap("Failed to LS on " + path, e);
+            throw new IOException("Failed to LS on " + path, e);
         }
     }
 
@@ -651,7 +643,7 @@
             srcPath.rename(dstPath);
         }
         catch (DataStorageException e) {
-            throw WrappedIOException.wrap("Failed to move " + src + " to " + 
dst, e);
+            throw new IOException("Failed to move " + src + " to " + dst, e);
         }
     }
     
@@ -666,7 +658,7 @@
             srcPath.copy(dstPath, mConf, false);
         }
         catch (DataStorageException e) {
-            throw WrappedIOException.wrap("Failed to copy " + src + " to " + 
dst, e);
+            throw new IOException("Failed to copy " + src + " to " + dst, e);
         }
     }
     
@@ -681,7 +673,7 @@
             srcPath.copy(dstPath, false);
         }
         catch (DataStorageException e) {
-            throw WrappedIOException.wrap("Failed to copy " + src + "to 
(locally) " + dst, e);
+            throw new IOException("Failed to copy " + src + "to (locally) " + 
dst, e);
         }
     }
 
@@ -696,7 +688,7 @@
             srcPath.copy(dstPath, false);
         }
         catch (DataStorageException e) {
-            throw WrappedIOException.wrap("Failed to copy (loally) " + src + 
"to " + dst, e);
+            throw new IOException("Failed to copy (loally) " + src + "to " + 
dst, e);
         }
     }
     

Modified: 
hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/RegexGroupCount.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/RegexGroupCount.java?rev=893817&r1=893816&r2=893817&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/RegexGroupCount.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/RegexGroupCount.java
 Thu Dec 24 22:58:33 2009
@@ -37,8 +37,6 @@
 
 import org.apache.pig.data.Tuple;
 
-import org.apache.pig.impl.util.WrappedIOException;
-
 public class RegexGroupCount extends EvalFunc<Integer> {
 
     private final Pattern pattern_;
@@ -85,7 +83,7 @@
 
                     i = 6666;
 
-                    throw WrappedIOException.wrap("Caught exception processing 
RegexGroupCount", e);
+                    throw new IOException("Caught exception processing 
RegexGroupCount", e);
 
                 }
 


Reply via email to