Author: gates
Date: Mon Feb  4 16:03:24 2008
New Revision: 618496

URL: http://svn.apache.org/viewvc?rev=618496&view=rev
Log:
Patch to address 1.5 compiler issues with previous patch for PIG-32.  Also 
addresses issue where local mode was broken by PIG-32 patch.


Modified:
    incubator/pig/trunk/src/org/apache/pig/PigServer.java
    
incubator/pig/trunk/src/org/apache/pig/backend/datastorage/DataStorageException.java
    
incubator/pig/trunk/src/org/apache/pig/backend/executionengine/ExecException.java
    
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HDataStorage.java
    
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HDirectory.java
    incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HFile.java
    incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HPath.java
    
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java
    
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HJob.java
    
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/MapRedPhysicalPlan.java
    
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapreduceExec/MapReduceLauncher.java
    
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalDataStorage.java
    
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalDir.java
    
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalFile.java
    
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalPath.java
    
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/LocalExecutionEngine.java
    
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/LocalJob.java
    
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/LocalPhysicalPlan.java
    incubator/pig/trunk/src/org/apache/pig/impl/PigContext.java
    incubator/pig/trunk/src/org/apache/pig/impl/io/FileLocalizer.java
    
incubator/pig/trunk/src/org/apache/pig/impl/logicalLayer/LogicalOperator.java
    
incubator/pig/trunk/src/org/apache/pig/impl/physicalLayer/PhysicalOperator.java
    incubator/pig/trunk/src/org/apache/pig/tools/grunt/GruntParser.java
    incubator/pig/trunk/test/org/apache/pig/test/TestLargeFile.java
    incubator/pig/trunk/test/org/apache/pig/test/TestPi.java
    incubator/pig/trunk/test/org/apache/pig/test/TestPigSplit.java
    incubator/pig/trunk/test/org/apache/pig/test/TestStore.java

Modified: incubator/pig/trunk/src/org/apache/pig/PigServer.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/PigServer.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- incubator/pig/trunk/src/org/apache/pig/PigServer.java (original)
+++ incubator/pig/trunk/src/org/apache/pig/PigServer.java Mon Feb  4 16:03:24 
2008
@@ -278,7 +278,9 @@
             }
         }
         catch (ExecException e) {
-            throw new IOException("Unable to open iterator for alias: " + id, 
e);
+            IOException ioe = new IOException("Unable to open iterator for 
alias: " + id);
+            ioe.initCause(e);
+            throw ioe;
         }
        }
     
@@ -323,7 +325,9 @@
             pigContext.getExecutionEngine().execute(pp);
         }
         catch (ExecException e) {
-            throw new IOException("Unable to store alias " + 
readFrom.getAlias(), e);
+            IOException ioe = new IOException("Unable to store alias " + 
readFrom.getAlias());
+            ioe.initCause(e);
+            throw ioe;
         }
     }
 
@@ -358,7 +362,9 @@
         catch (ExecException e) {
             PigLogger.getLogger().error("Failed to compile to physical plan: " 
+ alias);
             stream.println("Failed to compile the logical plan for " + alias + 
" into a physical plan");
-            throw new IOException("Failed to compile to phyiscal plan: " + 
alias, e);
+            IOException ioe = new IOException("Failed to compile to phyiscal 
plan: " + alias);
+            ioe.initCause(e);
+            throw ioe;
         }
     }
 
@@ -414,7 +420,9 @@
                    (new Integer(replication)).intValue();
         }
         catch (DataStorageException e) {
-            throw new IOException("Unable to get element descriptor for " + 
filename, e);
+            IOException ioe = new IOException("Unable to get element 
descriptor for " + filename);
+            ioe.initCause(e);
+            throw ioe;
         }
     }
     
@@ -424,7 +432,9 @@
             return elem.exists();
         }
         catch (DataStorageException e) {
-            throw new IOException("Unable to get element descriptor for " + 
filename, e);
+            IOException ioe = new IOException("Unable to get element 
descriptor for " + filename);
+            ioe.initCause(e);
+            throw ioe;
         }
     }
     
@@ -435,7 +445,9 @@
             return true;
         }
         catch (DataStorageException e) {
-            throw new IOException("Unable to get element descriptor for " + 
filename, e);
+            IOException ioe = new IOException("Unable to get element 
descriptor for " + filename);
+            ioe.initCause(e);
+            throw ioe;
         }
     }
     
@@ -451,7 +463,9 @@
             return true;
         }
         catch (DataStorageException e) {
-            throw new IOException("Unable to get container descriptor for " + 
dirs, e);
+            IOException ioe = new IOException("Unable to get container 
descriptor for " + dirs);
+            ioe.initCause(e);
+            throw ioe;
         }
     }
     
@@ -469,7 +483,9 @@
             return (String[])(allPaths.toArray());
         }
         catch (DataStorageException e) {
-            throw new IOException("Unable to get container descriptor for " + 
dir, e);
+            IOException ioe = new IOException("Unable to get container 
descriptor for " + dir);
+            ioe.initCause(e);
+            throw ioe;
         }
     }
     

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/datastorage/DataStorageException.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/datastorage/DataStorageException.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/datastorage/DataStorageException.java
 (original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/datastorage/DataStorageException.java
 Mon Feb  4 16:03:24 2008
@@ -1,6 +1,6 @@
 package org.apache.pig.backend.datastorage;
 
-public class DataStorageException extends Throwable {
+public class DataStorageException extends Exception {
 
     static final long serialVersionUID = 1;
     

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/executionengine/ExecException.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/executionengine/ExecException.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/executionengine/ExecException.java
 (original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/executionengine/ExecException.java
 Mon Feb  4 16:03:24 2008
@@ -1,6 +1,6 @@
 package org.apache.pig.backend.executionengine;
 
-public class ExecException extends Throwable {
+public class ExecException extends Exception {
     static final long serialVersionUID = 1;
     
     public ExecException (String message, Throwable cause) {

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HDataStorage.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HDataStorage.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HDataStorage.java
 (original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HDataStorage.java
 Mon Feb  4 16:03:24 2008
@@ -16,7 +16,8 @@
 
 
 public class HDataStorage implements DataStorage {
-        
+
+       
     private FileSystem fs;
     
     public HDataStorage(URI uri, Configuration conf) throws IOException {
@@ -35,15 +36,12 @@
         fs = FileSystem.get(conf.getConfiguration());
     }
 
-    @Override
     public void init() { }
     
-    @Override
     public void close() throws IOException {
         fs.close();
     }
     
-    @Override
     public Properties getConfiguration() {
         Properties props = new HConfiguration(fs.getConf());
                 
@@ -54,7 +52,6 @@
         return props;
     }
     
-    @Override
     public void updateConfiguration(Properties newConfiguration) 
             throws DataStorageException {        
         if (newConfiguration == null) {
@@ -73,7 +70,6 @@
         }
     }
     
-    @Override
     public Map<String, Object> getStatistics() throws IOException {
         Map<String, Object> stats = new HashMap<String, Object>();
 
@@ -93,7 +89,6 @@
         return stats;
     }
     
-    @Override
     public ElementDescriptor asElement(String name) 
             throws DataStorageException {
         if (this.isContainer(name)) {
@@ -104,77 +99,65 @@
         }
     }
     
-    @Override
     public ElementDescriptor asElement(ElementDescriptor element)
             throws DataStorageException {
         return asElement(element.toString());
     }
     
-    @Override
     public ElementDescriptor asElement(String parent,
                                                   String child) 
             throws DataStorageException {
         return asElement((new Path(parent, child)).toString());
     }
 
-    @Override
     public ElementDescriptor asElement(ContainerDescriptor parent,
                                                   String child) 
             throws DataStorageException {
         return asElement(parent.toString(), child);
     }
 
-    @Override
     public ElementDescriptor asElement(ContainerDescriptor parent,
                                                   ElementDescriptor child) 
             throws DataStorageException {
         return asElement(parent.toString(), child.toString());
     }
 
-    @Override
     public ContainerDescriptor asContainer(String name) 
             throws DataStorageException {
         return new HDirectory(this, name);
     }
     
-    @Override
     public ContainerDescriptor asContainer(ContainerDescriptor container)
             throws DataStorageException {
         return new HDirectory(this, container.toString());
     }
     
-    @Override
     public ContainerDescriptor asContainer(String parent,
                                                       String child) 
             throws DataStorageException {
         return new HDirectory(this, parent, child);
     }
 
-    @Override
     public ContainerDescriptor asContainer(ContainerDescriptor parent,
                                                       String child) 
             throws DataStorageException {
         return new HDirectory(this, parent.toString(), child);
     }
     
-    @Override
     public ContainerDescriptor asContainer(ContainerDescriptor parent,
                                                       ContainerDescriptor 
child)
             throws DataStorageException {
         return new HDirectory(this, parent.toString(), child.toString());
     }
     
-    @Override
     public void setActiveContainer(ContainerDescriptor container) {
         fs.setWorkingDirectory(new Path(container.toString()));
     }
     
-    @Override
     public ContainerDescriptor getActiveContainer() {
         return new HDirectory(this, fs.getWorkingDirectory());
     }
 
-    @Override
     public boolean isContainer(String name) throws DataStorageException {
         boolean isContainer = false;
         Path path = new Path(name);
@@ -191,7 +174,6 @@
         return isContainer;
     }
     
-    @Override
     public HPath[] asCollection(String pattern) throws DataStorageException {
         try {
             Path[] paths = this.fs.globPaths(new Path(pattern));

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HDirectory.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HDirectory.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HDirectory.java
 (original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HDirectory.java
 Mon Feb  4 16:03:24 2008
@@ -94,7 +94,9 @@
             }
         }
         catch (DataStorageException e) {
-            throw new IOException("Failed to copy " + this + " to " + dstName, 
e);
+            IOException ioe = new IOException("Failed to copy " + this + " to 
" + dstName);
+            ioe.initCause(e);
+            throw ioe;
         }
 
         if (removeSrc) {
@@ -102,17 +104,14 @@
         }
     }
 
-    @Override
     public InputStream open(Properties configuration) throws IOException {
        return open();
     }
     
-    @Override
     public InputStream open() throws IOException {
         throw new IOException("Cannot open dir " + path);
     }
 
-    @Override
     public SeekableInputStream sopen(Properties configuration) throws 
IOException {
        return sopen();
     }

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HFile.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HFile.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HFile.java 
(original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HFile.java 
Mon Feb  4 16:03:24 2008
@@ -38,28 +38,23 @@
         super(fs, path);
     }
     
-    @Override
     public OutputStream create(Properties configuration) 
              throws IOException {
         return fs.getHFS().create(path, false);
     }
     
-    @Override
     public InputStream open(Properties configuration) throws IOException {
         return open();
     }
     
-    @Override
     public InputStream open() throws IOException {
         return fs.getHFS().open(path);
     }
 
-    @Override
     public SeekableInputStream sopen(Properties configuration) throws 
IOException {
        return sopen();
     }
     
-       @Override
     public SeekableInputStream sopen() throws IOException {
         return new HSeekableInputStream(fs.getHFS().open(path),
                                         fs.getHFS().getContentLength(path));

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HPath.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HPath.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HPath.java 
(original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/datastorage/HPath.java 
Mon Feb  4 16:03:24 2008
@@ -46,16 +46,13 @@
         this.fs = fs;
     }
 
-    @Override
     public DataStorage getDataStorage() {
         return fs;
     }
     
-    @Override
     public abstract OutputStream create(Properties configuration) 
              throws IOException;
     
-    @Override
     public void copy(ElementDescriptor dstName,
                                 Properties dstConfiguration,
                      boolean removeSrc)
@@ -79,18 +76,14 @@
        }
     }
     
-    @Override
     public abstract InputStream open() throws IOException;
 
-    @Override
     public abstract SeekableInputStream sopen() throws IOException;
 
-    @Override
     public boolean exists() throws IOException {
         return fs.getHFS().exists(path);
     }
     
-    @Override
     public void rename(ElementDescriptor newName) 
              throws IOException {
         if (newName != null) {
@@ -98,13 +91,11 @@
         }
     }
 
-    @Override
     public void delete() throws IOException {
        // the file is removed and not placed in the trash bin
         fs.getHFS().delete(path);
     }
 
-    @Override
     public Properties getConfiguration() throws IOException {
         HConfiguration props = new HConfiguration();
 
@@ -118,7 +109,6 @@
         return props;
     }
 
-    @Override
     public void updateConfiguration(Properties newConfig) throws IOException {
         if (newConfig == null) {
             return;
@@ -130,7 +120,6 @@
                                    new Short(blkReplStr).shortValue());    
     }
 
-    @Override
     public Map<String, Object> getStatistics() throws IOException {
         HashMap<String, Object> props = new HashMap<String, Object>();
         
@@ -145,12 +134,10 @@
         return props;
     }
 
-    @Override
     public OutputStream create() throws IOException {
         return create(null);
     }
 
-    @Override
     public void copy(ElementDescriptor dstName,
                      boolean removeSrc) 
             throws IOException {
@@ -179,7 +166,6 @@
         return this.path.equals(((HPath)obj).path);  
     }
     
-    @Override
     public int compareTo(ElementDescriptor other) {
         return path.compareTo(((HPath)other).path);
     }

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java
 (original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java
 Mon Feb  4 16:03:24 2008
@@ -105,7 +105,6 @@
         conf.put("fs.default.name", newLocation);
     }
 
-    @Override
     public void init() throws ExecException {
         //First set the ssh socket factory
         setSSHFactory();
@@ -164,17 +163,14 @@
         }
     }
 
-    @Override
     public void close() throws ExecException {
         ;
     }
         
-    @Override
     public Properties getConfiguration() throws ExecException {
         return this.conf;
     }
         
-    @Override
     public void updateConfiguration(Properties newConfiguration) 
                throws ExecException {
        Enumeration keys = newConfiguration.propertyNames();
@@ -190,12 +186,10 @@
        }
     }
         
-    @Override
     public Map<String, Object> getStatistics() throws ExecException {
        throw new UnsupportedOperationException();
     }
 
-    @Override
     public ExecPhysicalPlan compile(ExecLogicalPlan plan,
                                                Properties properties)
             throws ExecException {
@@ -203,7 +197,6 @@
                        properties);
     }
 
-    @Override
     public ExecPhysicalPlan compile(ExecLogicalPlan[] plans,
                                                Properties properties)
             throws ExecException {
@@ -240,7 +233,6 @@
         return new MapRedPhysicalPlan(physicalKey, physicalOpTable);
     }
 
-    @Override
     public ExecJob execute(ExecPhysicalPlan plan) 
             throws ExecException {
 
@@ -284,22 +276,18 @@
 
     }
 
-    @Override
     public ExecJob submit(ExecPhysicalPlan plan) throws ExecException {
        throw new UnsupportedOperationException();
     }
 
-    @Override
     public Collection<ExecJob> runningJobs(Properties properties) throws 
ExecException {
        throw new UnsupportedOperationException();
     }
     
-    @Override
     public Collection<String> activeScopes() throws ExecException {
        throw new UnsupportedOperationException();
     }
     
-    @Override
     public void reclaimScope(String scope) throws ExecException {
        throw new UnsupportedOperationException();
     }

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HJob.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HJob.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HJob.java 
(original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HJob.java 
Mon Feb  4 16:03:24 2008
@@ -30,17 +30,14 @@
         this.outFileSpec = outFileSpec;
     }
     
-    @Override
     public JOB_STATUS getStatus() {
         return status;
     }
     
-    @Override
     public boolean hasCompleted() throws ExecException {
         return true;
     }
     
-    @Override
     public Iterator<Tuple> getResults() throws ExecException {
         final LoadFunc p;
         
@@ -98,38 +95,31 @@
         };
     }
 
-    @Override
     public Properties getContiguration() {
         Properties props = new Properties();
         return props;
     }
 
-    @Override
     public Map<String, Object> getStatistics() {
        throw new UnsupportedOperationException();
     }
 
-    @Override
     public void completionNotification(Object cookie) {
         throw new UnsupportedOperationException();
     }
     
-    @Override
     public void kill() throws ExecException {
         throw new UnsupportedOperationException();
     }
     
-    @Override
     public void getLogs(OutputStream log) throws ExecException {
        throw new UnsupportedOperationException();
     }
     
-    @Override
     public void getSTDOut(OutputStream out) throws ExecException {
        throw new UnsupportedOperationException();
     }
     
-    @Override
     public void getSTDError(OutputStream error) throws ExecException {
        throw new UnsupportedOperationException();
     }

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/MapRedPhysicalPlan.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/MapRedPhysicalPlan.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/MapRedPhysicalPlan.java
 (original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/MapRedPhysicalPlan.java
 Mon Feb  4 16:03:24 2008
@@ -24,31 +24,26 @@
         this.opTable = opTable;
     }
     
-    @Override
     public Properties getConfiguration() {
         // TODO
         return null;
     }
 
-    @Override
     public void updateConfiguration(Properties configuration)
         throws ExecException {
         // TODO
     }
              
-    @Override
     public void explain(OutputStream out) {
         POVisitor lprinter = new POVisitor(new PrintStream(out));
         
         ((PhysicalOperator)opTable.get(root)).visit(lprinter, "");
     }
     
-    @Override
     public Map<OperatorKey, ExecPhysicalOperator> getOpTable() {
        return opTable;
     }
     
-    @Override
     public OperatorKey getRoot() {
         return this.root;
     }

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapreduceExec/MapReduceLauncher.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapreduceExec/MapReduceLauncher.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapreduceExec/MapReduceLauncher.java
 (original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapreduceExec/MapReduceLauncher.java
 Mon Feb  4 16:03:24 2008
@@ -265,7 +265,9 @@
                    }
                }
                catch (DataStorageException e) {
-                   throw new IOException("Failed to obtain descriptor for " + 
outputFile.toString(), e);
+                   IOException ioe = new IOException("Failed to obtain 
descriptor for " + outputFile.toString());
+                   ioe.initCause(e);
+                   throw ioe;
                }
 
                if (!success) {

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalDataStorage.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalDataStorage.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalDataStorage.java
 (original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalDataStorage.java
 Mon Feb  4 16:03:24 2008
@@ -15,17 +15,14 @@
         workingDir = new File(System.getProperty("user.dir"));
     }
     
-    @Override
     public void init() {
         ;
     }
 
-    @Override
     public void close() throws IOException {
         ;
     }
     
-    @Override
     public Properties getConfiguration() {
         Properties config = new Properties();
         
@@ -34,18 +31,15 @@
         return config;
     }
     
-    @Override
     public void updateConfiguration(Properties newConfiguration) 
          throws DataStorageException {
         ;
     }
     
-    @Override
     public Map<String, Object> getStatistics() throws IOException {
        throw new UnsupportedOperationException();
     }
             
-    @Override
     public LocalPath asElement(String name) 
             throws DataStorageException {
         if (this.isContainer(name)) {
@@ -56,67 +50,57 @@
         }
     }
 
-    @Override
     public LocalPath asElement(ElementDescriptor element)
             throws DataStorageException {
         return asElement(element.toString());
     }
     
-    @Override
     public LocalPath asElement(String parent,
                                String child) 
             throws DataStorageException {
         return asElement((new File(parent, child).toString()));
     }
 
-    @Override
     public LocalPath asElement(ContainerDescriptor parent,
                                String child) 
             throws DataStorageException {
         return asElement(parent.toString(), child);
     }
 
-    @Override
     public LocalPath asElement(ContainerDescriptor parent,
                                ElementDescriptor child)
             throws DataStorageException {
         return asElement(parent.toString(), child.toString());
     }
     
-    @Override
     public LocalDir asContainer(String name) 
             throws DataStorageException {
         return new LocalDir(this, name);
     }
     
-    @Override
     public LocalDir asContainer(ContainerDescriptor container)
             throws DataStorageException {
         return new LocalDir(this, container.toString());
     }
     
-    @Override
     public LocalDir asContainer(String parent,
                                 String child) 
             throws DataStorageException {
         return new LocalDir(this, parent, child);
     }
 
-    @Override
     public LocalDir asContainer(ContainerDescriptor parent,
                                 String child) 
             throws DataStorageException {
         return new LocalDir(this, parent.toString(), child);
     }
     
-    @Override
     public LocalDir asContainer(ContainerDescriptor parent,
                                 ContainerDescriptor child) 
         throws DataStorageException {
         return new LocalDir(this, parent.toString(), child.toString());
     }
 
-    @Override
     public boolean isContainer(String name) throws DataStorageException {
         boolean isContainer = false;
         File file = new File(name);
@@ -128,17 +112,14 @@
         return isContainer;
     }
     
-    @Override
     public void setActiveContainer(ContainerDescriptor container) {
        this.workingDir = new File(container.toString());
     }
     
-    @Override
     public ContainerDescriptor getActiveContainer() {
         return new LocalDir(this, this.workingDir.getPath());
     }
     
-    @Override
     public LocalPath[] asCollection(String pattern) throws 
DataStorageException {
        throw new UnsupportedOperationException();
     }

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalDir.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalDir.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalDir.java 
(original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalDir.java 
Mon Feb  4 16:03:24 2008
@@ -64,7 +64,9 @@
                }
        }
        catch (DataStorageException e) {
-               throw new IOException("Failed to get container for " + 
dstName.toString(), e);
+               IOException ioe = new IOException("Failed to get container for 
" + dstName.toString());
+               ioe.initCause(e);
+               throw ioe;
        }
 
         copy((ContainerDescriptor) dstName,
@@ -120,7 +122,9 @@
             }
         }
         catch (DataStorageException e) {
-            throw new IOException("Failed to copy " + this + " to " + dstName, 
e);
+            IOException ioe = new IOException("Failed to copy " + this + " to 
" + dstName);
+            ioe.initCause(e);
+            throw ioe;
         }
 
         if (removeSrc) {
@@ -128,27 +132,22 @@
         }
     }
 
-    @Override
     public InputStream open(Properties configuration) throws IOException {
        return open();
     }
     
-    @Override
     public InputStream open() throws IOException {
         throw new IOException("Cannot open dir " + path);
     }
 
-    @Override
     public SeekableInputStream sopen(Properties configuration) throws 
IOException {
        return sopen();
     }
     
-    @Override
     public SeekableInputStream sopen() throws IOException {
         throw new IOException("Cannot sopen dir " + path);
     }
 
-    @Override
     public Iterator<ElementDescriptor> iterator() {
         LinkedList<ElementDescriptor> elements =
             new LinkedList<ElementDescriptor>();

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalFile.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalFile.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalFile.java 
(original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalFile.java 
Mon Feb  4 16:03:24 2008
@@ -72,9 +72,10 @@
                                                 path.getName());
                 }
                 catch (DataStorageException e) {
-                    throw new IOException("Unable to generate element name 
(src: " + 
-                                           this + ", dst: " + dstName + ")",
-                                          e);
+                    IOException ioe = new IOException("Unable to generate 
element name (src: " + 
+                                           this + ", dst: " + dstName + ")");
+                    ioe.initCause(e);
+                    throw ioe;
                 }
             }
         }
@@ -98,28 +99,26 @@
         }
     }    
 
-    @Override
     public InputStream open (Properties configuration) throws IOException {
        return open();
     }
     
-    @Override
     public InputStream open () throws IOException {
         return new FileInputStream(this.path);
     }
     
-    @Override
     public SeekableInputStream sopen(Properties configuration) throws 
IOException {
        return sopen();
     }
     
-       @Override
     public SeekableInputStream sopen() throws IOException {
         try {
             return new LocalSeekableInputStream(this.path);
         }
         catch (FileNotFoundException e) {
-            throw new IOException("Unable to find " + this.path, e);
+            IOException ioe = new IOException("Unable to find " + this.path);
+            ioe.initCause(e);
+            throw ioe;
         }
     }
 }

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalPath.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalPath.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalPath.java 
(original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/local/datastorage/LocalPath.java 
Mon Feb  4 16:03:24 2008
@@ -60,7 +60,6 @@
         this(fs, parent, child.getPath());
     }
     
-    @Override
     public DataStorage getDataStorage() {
         return fs;
     }
@@ -69,40 +68,32 @@
         return this.path;
     }
 
-    @Override
     public abstract OutputStream create(Properties configuration) 
             throws IOException;
 
-    @Override
     public OutputStream create() 
             throws IOException {
         return create(null);
     }
 
-    @Override
     public abstract void copy(ElementDescriptor dstName,
                               Properties dstConfiguration,
                               boolean removeSrc) 
             throws IOException;
         
-    @Override
     public void copy(ElementDescriptor dstName,
                      boolean removeSrc) throws IOException {
         copy(dstName, null, removeSrc);
     }
                 
-    @Override
     public abstract InputStream open() throws IOException;
 
-    @Override
     public abstract SeekableInputStream sopen() throws IOException;
         
-    @Override
     public boolean exists() throws IOException {
         return getCurPath().exists();
     }
     
-    @Override
     public void rename(ElementDescriptor newName) 
             throws IOException {
         if (! this.path.renameTo(((LocalPath)newName).path)) {
@@ -111,12 +102,10 @@
         }
     }
 
-    @Override
     public void delete() throws IOException {
         getCurPath().delete();
     }
 
-    @Override
     public Properties getConfiguration() throws IOException {
         Properties props = new Properties();
         
@@ -125,13 +114,11 @@
         return props;
     }
 
-    @Override
     public void updateConfiguration(Properties newConfig) 
             throws IOException {
         ;
     }
         
-    @Override
     public Map<String, Object> getStatistics() throws IOException {
         Map<String, Object> stats = new HashMap<String, Object>();
 
@@ -144,7 +131,6 @@
         return stats;
     }
 
-    @Override
     public int compareTo(ElementDescriptor other) {
         return this.path.compareTo(((LocalPath)other).path);
     }

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/LocalExecutionEngine.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/LocalExecutionEngine.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/LocalExecutionEngine.java
 (original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/LocalExecutionEngine.java
 Mon Feb  4 16:03:24 2008
@@ -53,40 +53,33 @@
         this.materializedResults = new HashMap<OperatorKey, LocalResult>();
     }
 
-    @Override
     public DataStorage getDataStorage() {
         return this.ds;
     }
     
-    @Override
     public void init() throws ExecException {
         ;
     }
 
-    @Override
     public void close() throws ExecException {
         ;
     }
         
-    @Override
     public Properties getConfiguration() throws ExecException {
         Properties conf = new Properties();
         return conf;
     }
         
-    @Override
     public void updateConfiguration(Properties newConfiguration) 
         throws ExecException {
         ;
     }
         
-    @Override
     public Map<String, Object> getStatistics() throws ExecException {
        throw new UnsupportedOperationException();
     }
 
     
-    @Override
     public LocalPhysicalPlan compile(ExecLogicalPlan plan,
                                      Properties properties)
             throws ExecException {
@@ -97,7 +90,6 @@
         return compile(new ExecLogicalPlan[]{ plan } , properties);
     }
 
-    @Override
     public LocalPhysicalPlan compile(ExecLogicalPlan[] plans,
                                      Properties properties)
             throws ExecException {
@@ -127,7 +119,6 @@
         return new LocalPhysicalPlan(physicalKey, physicalOpTable);
     }
 
-    @Override
     public LocalJob execute(ExecPhysicalPlan plan) throws ExecException {
         DataBag results = BagFactory.getInstance().newDefaultBag();
         try {
@@ -149,22 +140,18 @@
         return new LocalJob(results, JOB_STATUS.COMPLETED);
     }
 
-    @Override
     public LocalJob submit(ExecPhysicalPlan plan) throws ExecException {
         throw new UnsupportedOperationException();
     }
 
-    @Override
     public Collection<ExecJob> runningJobs(Properties properties) throws 
ExecException {
         return new HashSet<ExecJob>();
     }
     
-    @Override
     public Collection<String> activeScopes() throws ExecException {
        throw new UnsupportedOperationException();
     }
     
-    @Override
     public void reclaimScope(String scope) throws ExecException {
        throw new UnsupportedOperationException();
     }

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/LocalJob.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/LocalJob.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/LocalJob.java
 (original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/LocalJob.java
 Mon Feb  4 16:03:24 2008
@@ -20,53 +20,43 @@
         this.status = status;
     }
     
-    @Override
     public JOB_STATUS getStatus() {
         return status;
     }
     
-    @Override
     public boolean hasCompleted() throws ExecException {
         return true;
     }
     
-    @Override
     public Iterator<Tuple> getResults() throws ExecException {
         return this.results.content();
     }
 
-    @Override
     public Properties getContiguration() {
         Properties props = new Properties();
         return props;
     }
 
-    @Override
     public Map<String, Object> getStatistics() {
        throw new UnsupportedOperationException();
     }
 
-    @Override
     public void completionNotification(Object cookie) {
         throw new UnsupportedOperationException();
     }
     
-    @Override
     public void kill() throws ExecException {
         throw new UnsupportedOperationException();
     }
     
-    @Override
     public void getLogs(OutputStream log) throws ExecException {
        throw new UnsupportedOperationException();
     }
     
-    @Override
     public void getSTDOut(OutputStream out) throws ExecException {
        throw new UnsupportedOperationException();
     }
     
-    @Override
     public void getSTDError(OutputStream error) throws ExecException {
        throw new UnsupportedOperationException();
     }

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/LocalPhysicalPlan.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/LocalPhysicalPlan.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/LocalPhysicalPlan.java
 (original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/LocalPhysicalPlan.java
 Mon Feb  4 16:03:24 2008
@@ -23,30 +23,25 @@
         this.opTable = opTable;
     }
     
-    @Override
     public Properties getConfiguration() {
        throw new UnsupportedOperationException();
     }
 
-    @Override
     public void updateConfiguration(Properties configuration)
         throws ExecException {
         throw new UnsupportedOperationException();
     }
              
-    @Override
     public void explain(OutputStream out) {
         POVisitor lprinter = new POVisitor(new PrintStream(out));
         
         ((PhysicalOperator)opTable.get(root)).visit(lprinter, "");
     }
     
-    @Override
     public Map<OperatorKey, ExecPhysicalOperator> getOpTable() {
        return opTable;
     }
     
-    @Override
     public OperatorKey getRoot() {
         return root;
     }

Modified: incubator/pig/trunk/src/org/apache/pig/impl/PigContext.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/impl/PigContext.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- incubator/pig/trunk/src/org/apache/pig/impl/PigContext.java (original)
+++ incubator/pig/trunk/src/org/apache/pig/impl/PigContext.java Mon Feb  4 
16:03:24 2008
@@ -248,7 +248,9 @@
             src = dfs.asElement(oldName);            
         }
         catch (DataStorageException e) {
-            throw new IOException("Unable to rename " + oldName + " to " + 
newName, e);
+            IOException ioe = new IOException("Unable to rename " + oldName + 
" to " + newName);
+            ioe.initCause(e);
+            throw ioe;
         }
 
         if (dst.exists()) {
@@ -274,8 +276,9 @@
             dstElement = dstStorage.asElement(dst);
         }
         catch (DataStorageException e) {
-            throw new IOException ("Unable to copy " + src + " to " + dst + 
(localDst ? "locally" : ""), 
-                                    e);
+               IOException ioe = new IOException ("Unable to copy " + src + " 
to " + dst + (localDst ? "locally" : ""));
+               ioe.initCause(e);
+               throw ioe;
         }
         
         srcElement.copy(dstElement, conf,false);

Modified: incubator/pig/trunk/src/org/apache/pig/impl/io/FileLocalizer.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/impl/io/FileLocalizer.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- incubator/pig/trunk/src/org/apache/pig/impl/io/FileLocalizer.java (original)
+++ incubator/pig/trunk/src/org/apache/pig/impl/io/FileLocalizer.java Mon Feb  
4 16:03:24 2008
@@ -160,7 +160,9 @@
             return openDFSFile(elem);
         }
         catch (DataStorageException e) {
-            throw new IOException("Failed to obtain descriptor for " + 
fileName, e);
+            IOException ioe = new IOException("Failed to obtain descriptor for 
" + fileName);
+            ioe.initCause(e);
+            throw ioe;
         }
     }
     
@@ -174,7 +176,9 @@
                        }
             }
             catch (DataStorageException e) {
-                throw new IOException("Failed to determine if elem=" + elem + 
" is container", e);
+               IOException ioe = new IOException("Failed to determine if 
elem=" + elem + " is container");
+               ioe.initCause(e);
+               throw ioe;
             }
             
             ArrayList<ElementDescriptor> arrayList = 
@@ -209,7 +213,9 @@
                 return openDFSFile(elem);
             }
             catch (DataStorageException e) {
-                throw new IOException("Failed to open " + fileSpec, e);
+                IOException ioe = new IOException("Failed to open " + 
fileSpec);
+                ioe.initCause(e);
+                throw ioe;
             }
         }
         else {
@@ -232,7 +238,9 @@
                 return elem.create();
             }
             catch (DataStorageException e) {
-                throw new IOException("Failed to create " + fileSpec, e);
+                IOException ioe = new IOException("Failed to create " + 
fileSpec);
+                ioe.initCause(e);
+                throw ioe;
             }
         }
         else {
@@ -292,7 +300,9 @@
             return elem;
         }
         catch (DataStorageException e) {
-            throw new IOException("Unable to get elem descriptor for " + 
relative.toString(), e);
+            IOException ioe = new IOException("Unable to get elem descriptor 
for " + relative.toString());
+            ioe.initCause(e);
+            throw ioe;
         }
     }
 
@@ -328,7 +338,9 @@
             return distribElem.toString();
         }
         catch (DataStorageException e) {
-            throw new IOException("Failed to hadoopify " + filename, e);
+            IOException ioe = new IOException("Failed to hadoopify " + 
filename);
+            ioe.initCause(e);
+            throw ioe;
         }        
     }
 
@@ -385,7 +397,9 @@
                }
            }
            catch (DataStorageException e) {
-               throw new IOException("Unable to get collect for pattern " + 
elem.toString(), e);
+               IOException ioe = new IOException("Unable to get collect for 
pattern " + elem.toString());
+               ioe.initCause(e);
+               throw ioe;
            }
        }
 

Modified: 
incubator/pig/trunk/src/org/apache/pig/impl/logicalLayer/LogicalOperator.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/impl/logicalLayer/LogicalOperator.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/impl/logicalLayer/LogicalOperator.java 
(original)
+++ 
incubator/pig/trunk/src/org/apache/pig/impl/logicalLayer/LogicalOperator.java 
Mon Feb  4 16:03:24 2008
@@ -81,17 +81,14 @@
         opTable.put(getOperatorKey(), this);
     }
     
-    @Override
     public OperatorKey getOperatorKey() {
         return new OperatorKey(scope, id);
     }
     
-    @Override
     public String getScope() {
         return this.scope;
     }
     
-    @Override 
     public long getId() {
         return this.id;
     }

Modified: 
incubator/pig/trunk/src/org/apache/pig/impl/physicalLayer/PhysicalOperator.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/impl/physicalLayer/PhysicalOperator.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/impl/physicalLayer/PhysicalOperator.java 
(original)
+++ 
incubator/pig/trunk/src/org/apache/pig/impl/physicalLayer/PhysicalOperator.java 
Mon Feb  4 16:03:24 2008
@@ -53,12 +53,10 @@
         return new OperatorKey(scope, id);
     }
     
-    @Override
     public String getScope() {
         return this.scope;
     }
     
-    @Override
     public long getId() {
         return this.id;
     }

Modified: incubator/pig/trunk/src/org/apache/pig/tools/grunt/GruntParser.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/tools/grunt/GruntParser.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- incubator/pig/trunk/src/org/apache/pig/tools/grunt/GruntParser.java 
(original)
+++ incubator/pig/trunk/src/org/apache/pig/tools/grunt/GruntParser.java Mon Feb 
 4 16:03:24 2008
@@ -24,6 +24,7 @@
 import org.apache.pig.backend.datastorage.DataStorageException;
 import org.apache.pig.backend.datastorage.ElementDescriptor;
 import org.apache.pig.backend.datastorage.ContainerDescriptor;
+import org.apache.pig.backend.executionengine.ExecutionEngine;
 import org.apache.pig.backend.hadoop.executionengine.HExecutionEngine;
 
 public class GruntParser extends PigScriptParser {
@@ -90,7 +91,13 @@
                // the back end to kill a given job (mJobClient is used only in 
                // processKill)
                //
-               mJobClient = 
((HExecutionEngine)(mPigServer.getPigContext().getExecutionEngine())).getJobClient();
+               ExecutionEngine execEngine = 
mPigServer.getPigContext().getExecutionEngine();
+               if (execEngine instanceof HExecutionEngine) {
+                       mJobClient = 
((HExecutionEngine)execEngine).getJobClient();
+               }
+               else {
+                       mJobClient = null;
+               }
        }
 
        public void prompt()
@@ -188,7 +195,9 @@
                        }
                }
                catch (DataStorageException e) {
-                       throw new IOException("Failed to Cat: " + path, e);
+                       IOException ioe = new IOException("Failed to Cat: " + 
path);
+                       ioe.initCause(e);
+                       throw ioe; 
                }
        }
 
@@ -217,10 +226,11 @@
                        }
                }
                catch (DataStorageException e) {
-                       throw new IOException("Failed to change working 
directory to " + 
+                       IOException ioe = new IOException("Failed to change 
working directory to " + 
                                                                  ((path == 
null) ? ("/user/" + System.getProperty("user.name")) 
-                                                                               
      : (path)),
-                                                                 e);
+                                                                               
      : (path)));
+                       ioe.initCause(e);
+                       throw ioe;
                }
        }
 
@@ -236,16 +246,18 @@
 
        protected void processKill(String jobid) throws IOException
        {
-               RunningJob job = mJobClient.getJob(jobid);
-               if (job == null)
-                       System.out.println("Job with id " + jobid + " is not 
active");
-               else
-               {       
-                       job.killJob();
-                       System.err.println("kill submited.");
+               if (mJobClient != null) {
+                       RunningJob job = mJobClient.getJob(jobid);
+                       if (job == null)
+                               System.out.println("Job with id " + jobid + " 
is not active");
+                       else
+                       {       
+                               job.killJob();
+                               System.err.println("kill submited.");
+                       }
                }
        }
-
+               
        protected void processLS(String path) throws IOException
        {
                try {
@@ -284,15 +296,19 @@
                                }
                        }
                        else {
-                               Map<String, Object> properties = 
pathDescriptor.getStatistics();
-                               String strReplication = (String) 
properties.get(DataStorage.DEFAULT_REPLICATION_FACTOR_KEY);
-                               String strLen = (String) 
properties.get(DataStorage.USED_BYTES_KEY);
+                               Properties config = 
pathDescriptor.getConfiguration();
+                               Map<String, Object> stats = 
pathDescriptor.getStatistics();
+
+                               String strReplication = (String) 
config.get(ElementDescriptor.BLOCK_REPLICATION_KEY);
+                               String strLen = (String) 
stats.get(ElementDescriptor.LENGTH_KEY);
 
                                System.out.println(pathDescriptor.toString() + 
"<r " + strReplication + ">\t" + strLen);                                
                        }
                }
                catch (DataStorageException e) {
-                       throw new IOException("Failed to LS on " + path, e);
+                       IOException ioe = new IOException("Failed to LS on " + 
path);
+                       ioe.initCause(e);
+                       throw ioe;
                }
        }
        
@@ -332,7 +348,9 @@
                        srcPath.rename(dstPath);
                }
                catch (DataStorageException e) {
-                       throw new IOException("Failed to move " + src + " to " 
+ dst, e);
+                       IOException ioe = new IOException("Failed to move " + 
src + " to " + dst);
+                       ioe.initCause(e);
+                       throw ioe;              
                }
        }
        
@@ -345,7 +363,9 @@
                        srcPath.copy(dstPath, mConf, false);
                }
                catch (DataStorageException e) {
-                       throw new IOException("Failed to copy " + src + " to " 
+ dst, e);
+                       IOException ioe = new IOException("Failed to copy " + 
src + " to " + dst);
+                       ioe.initCause(e);
+                       throw ioe;
                }
        }
        
@@ -358,7 +378,9 @@
                        srcPath.copy(dstPath, false);
                }
                catch (DataStorageException e) {
-                       throw new IOException("Failed to copy " + src + "to 
(locally) " + dst, e);
+                       IOException ioe = new IOException("Failed to copy " + 
src + "to (locally) " + dst);
+                       ioe.initCause(e);
+                       throw ioe;
                }
        }
 
@@ -371,7 +393,9 @@
                        srcPath.copy(dstPath, false);
                }
                catch (DataStorageException e) {
-                       throw new IOException("Failed to copy (loally) " + src 
+ "to " + dst, e);
+                       IOException ioe = new IOException("Failed to copy 
(loally) " + src + "to " + dst);
+                       ioe.initCause(e);
+                       throw ioe;
                }
        }
        
@@ -383,7 +407,9 @@
                        dirDescriptor.create();
                }
                catch (DataStorageException e) {
-                       throw new IOException("Failed to create dir: " + dir, 
e);
+                       IOException ioe = new IOException("Failed to create 
dir: " + dir);
+                       ioe.initCause(e);
+                       throw ioe;
                }
        }
        
@@ -407,7 +433,9 @@
                        dfsPath.delete();
                }
                catch (DataStorageException e) {
-                       throw new IOException("Failed to get descriptor for " + 
path, e);
+                       IOException ioe = new IOException("Failed to get 
descriptor for " + path);
+                       ioe.initCause(e);
+                       throw ioe;
                }
        }
 

Modified: incubator/pig/trunk/test/org/apache/pig/test/TestLargeFile.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/TestLargeFile.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- incubator/pig/trunk/test/org/apache/pig/test/TestLargeFile.java (original)
+++ incubator/pig/trunk/test/org/apache/pig/test/TestLargeFile.java Mon Feb  4 
16:03:24 2008
@@ -91,7 +91,9 @@
             pig = new PigServer(initString);
         }
         catch (ExecException e) {
-            throw new IOException("Failed to create Pig server", e);
+               IOException ioe = new IOException("Failed to create Pig 
server");
+               ioe.initCause(e);
+            throw ioe;
         }
                fileName = "'" + FileLocalizer.hadoopify(datFile.toString(), 
pig.getPigContext()) + "'";
                tmpFile1 = "'" + FileLocalizer.getTemporaryPath(null, 
pig.getPigContext()).toString() + "'";

Modified: incubator/pig/trunk/test/org/apache/pig/test/TestPi.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/TestPi.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- incubator/pig/trunk/test/org/apache/pig/test/TestPi.java (original)
+++ incubator/pig/trunk/test/org/apache/pig/test/TestPi.java Mon Feb  4 
16:03:24 2008
@@ -97,7 +97,9 @@
             pig = new PigServer(initString);
         }
         catch (ExecException e) {
-            throw new IOException("Failed to create Pig Server", e);
+               IOException ioe = new IOException("Failed to create Pig 
Server");
+               ioe.initCause(e);
+            throw ioe;
         }
         
         fileName = "'" + FileLocalizer.hadoopify(datFile.toString(), 
pig.getPigContext()) + "'";

Modified: incubator/pig/trunk/test/org/apache/pig/test/TestPigSplit.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/TestPigSplit.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- incubator/pig/trunk/test/org/apache/pig/test/TestPigSplit.java (original)
+++ incubator/pig/trunk/test/org/apache/pig/test/TestPigSplit.java Mon Feb  4 
16:03:24 2008
@@ -44,7 +44,9 @@
                    pig = new PigServer();
                }
                catch (ExecException e) {
-                   throw new IOException("Failed to create Pig Server", e);
+                       IOException ioe = new IOException("Failed to create Pig 
Server");
+                       ioe.initCause(e);
+                   throw ioe;
                }
        }
        @Test

Modified: incubator/pig/trunk/test/org/apache/pig/test/TestStore.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/TestStore.java?rev=618496&r1=618495&r2=618496&view=diff
==============================================================================
--- incubator/pig/trunk/test/org/apache/pig/test/TestStore.java (original)
+++ incubator/pig/trunk/test/org/apache/pig/test/TestStore.java Mon Feb  4 
16:03:24 2008
@@ -110,7 +110,9 @@
                    pig = new PigServer(initString);
                }
                catch (ExecException e) {
-                   throw new IOException("Failed to create Pig Server", e);
+                       IOException ioe = new IOException("Failed to create Pig 
Server");
+                       ioe.initCause(e);
+                   throw ioe;
                }
                
                fileName = "'" + FileLocalizer.hadoopify(f.toString(), 
pig.getPigContext()) + "'";


Reply via email to