Author: gates
Date: Wed Feb  6 13:00:14 2008
New Revision: 619153

URL: http://svn.apache.org/viewvc?rev=619153&view=rev
Log:
PIG-95: Remove System.exit() statements from inside pig.


Modified:
    incubator/pig/trunk/CHANGES.txt
    
incubator/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java
    
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/POStore.java

Modified: incubator/pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/CHANGES.txt?rev=619153&r1=619152&r2=619153&view=diff
==============================================================================
--- incubator/pig/trunk/CHANGES.txt (original)
+++ incubator/pig/trunk/CHANGES.txt Wed Feb  6 13:00:14 2008
@@ -87,3 +87,5 @@
        PIG-89: Fix DefaultDataBag, DistinctDataBag, SortedDataBag to close 
spill
        files when they are done spilling (contributions by craigm, breed, and
        gates, committed by gates).
+
+       PIG-95: Remove System.exit() statements from inside pig (joa23 via 
gates).

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=619153&r1=619152&r2=619153&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
 Wed Feb  6 13:00:14 2008
@@ -314,7 +314,7 @@
         NOTHING, HDFSUI, MAPREDUI, HDFS, MAPRED, HADOOPCONF
     };
     
-    private String[] doHod(String server) {
+    private String[] doHod(String server) throws ExecException {
         if (hodMapRed != null) {
             return new String[] {hodHDFS, hodMapRed};
         }
@@ -442,10 +442,10 @@
             return new String[] {hdfs, mapred};
         } 
         catch (Exception e) {
-            logger.fatal("Could not connect to HOD", e);
-            System.exit(4);
+            ExecException ee = new ExecException("Could not connect to HOD");
+            ee.initCause(e);
+            throw ee;
         }
-        throw new RuntimeException("Could not scrape needed information.");
     }
 
     private String fixUpDomain(String hostPort) throws UnknownHostException {

Modified: 
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/POStore.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/POStore.java?rev=619153&r1=619152&r2=619153&view=diff
==============================================================================
--- 
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/POStore.java
 (original)
+++ 
incubator/pig/trunk/src/org/apache/pig/backend/local/executionengine/POStore.java
 Wed Feb  6 13:00:14 2008
@@ -119,9 +119,9 @@
     @Override
        public int getOutputType(){
        System.err.println("No one should be asking my output type");
-       new RuntimeException().printStackTrace();
-       System.exit(1);
-       return -1;
+       RuntimeException runtimeException = new RuntimeException();
+               runtimeException.printStackTrace();
+               throw runtimeException;
     }
 
     @Override


Reply via email to