You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2010/10/07 20:07:54 UTC

svn commit: r1005547 - in /pig/branches/branch-0.8: CHANGES.txt src/org/apache/pig/PigServer.java src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java test/org/apache/pig/test/TestInputOutputFileValidator.java

Author: daijy
Date: Thu Oct  7 18:07:53 2010
New Revision: 1005547

URL: http://svn.apache.org/viewvc?rev=1005547&view=rev
Log:
PIG-1670: pig throws ExecException in stead of FrontEnd exception when the plan validation fails

Modified:
    pig/branches/branch-0.8/CHANGES.txt
    pig/branches/branch-0.8/src/org/apache/pig/PigServer.java
    pig/branches/branch-0.8/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java
    pig/branches/branch-0.8/test/org/apache/pig/test/TestInputOutputFileValidator.java

Modified: pig/branches/branch-0.8/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.8/CHANGES.txt?rev=1005547&r1=1005546&r2=1005547&view=diff
==============================================================================
--- pig/branches/branch-0.8/CHANGES.txt (original)
+++ pig/branches/branch-0.8/CHANGES.txt Thu Oct  7 18:07:53 2010
@@ -200,6 +200,8 @@ PIG-1309: Map-side Cogroup (ashutoshc)
 
 BUG FIXES
 
+PIG-1670: pig throws ExecException in stead of FrontEnd exception when the plan validation fails (nrai via daijy)
+
 PIG-1668: Order by failed with RuntimeException (rding)
 
 PIG-1659: sortinfo is not set for store if there is a filter after ORDER BY (daijy)

Modified: pig/branches/branch-0.8/src/org/apache/pig/PigServer.java
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.8/src/org/apache/pig/PigServer.java?rev=1005547&r1=1005546&r2=1005547&view=diff
==============================================================================
--- pig/branches/branch-0.8/src/org/apache/pig/PigServer.java (original)
+++ pig/branches/branch-0.8/src/org/apache/pig/PigServer.java Thu Oct  7 18:07:53 2010
@@ -1345,7 +1345,7 @@ public class PigServer {
         return lp;
     }
 
-    private PhysicalPlan compilePp(LogicalPlan lp) throws ExecException {
+    private PhysicalPlan compilePp(LogicalPlan lp) throws FrontendException {
         // translate lp to physical plan
         PhysicalPlan pp = pigContext.getExecutionEngine().compile(lp, null);
 

Modified: pig/branches/branch-0.8/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.8/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java?rev=1005547&r1=1005546&r2=1005547&view=diff
==============================================================================
--- pig/branches/branch-0.8/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java (original)
+++ pig/branches/branch-0.8/src/org/apache/pig/backend/hadoop/executionengine/HExecutionEngine.java Thu Oct  7 18:07:53 2010
@@ -240,11 +240,11 @@ public class HExecutionEngine {
 
     @SuppressWarnings("unchecked")
     public PhysicalPlan compile(LogicalPlan plan,
-                                Properties properties) throws ExecException {
+                                Properties properties) throws FrontendException {
         if (plan == null) {
             int errCode = 2041;
             String msg = "No Plan to compile";
-            throw new ExecException(msg, errCode, PigException.BUG);
+            throw new FrontendException(msg, errCode, PigException.BUG);
         }
 
         try {
@@ -305,7 +305,7 @@ public class HExecutionEngine {
         } catch (Exception ve) {
             int errCode = 2042;
             String msg = "Error in new logical plan. Try -Dpig.usenewlogicalplan=false.";
-            throw new ExecException(msg, errCode, PigException.BUG, ve);
+            throw new FrontendException(msg, errCode, PigException.BUG, ve);
         }
     }
     

Modified: pig/branches/branch-0.8/test/org/apache/pig/test/TestInputOutputFileValidator.java
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.8/test/org/apache/pig/test/TestInputOutputFileValidator.java?rev=1005547&r1=1005546&r2=1005547&view=diff
==============================================================================
--- pig/branches/branch-0.8/test/org/apache/pig/test/TestInputOutputFileValidator.java (original)
+++ pig/branches/branch-0.8/test/org/apache/pig/test/TestInputOutputFileValidator.java Thu Oct  7 18:07:53 2010
@@ -262,7 +262,7 @@ public class TestInputOutputFileValidato
             pig.executeBatch();
             assert false;
         }catch(Exception fe){
-        	assertTrue(fe instanceof ExecException);
+        	assertTrue(fe instanceof FrontendException);
         	PigException pe = LogUtils.getPigException(fe);
         	assertTrue(pe instanceof FrontendException);
         	assertEquals(1115, pe.getErrorCode());