You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by rd...@apache.org on 2011/05/07 02:11:44 UTC

svn commit: r1100417 - in /pig/branches/branch-0.8: CHANGES.txt src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java

Author: rding
Date: Sat May  7 00:11:44 2011
New Revision: 1100417

URL: http://svn.apache.org/viewvc?rev=1100417&view=rev
Log:
PIG-2033: Pig returns sucess for the failed Pig script

Modified:
    pig/branches/branch-0.8/CHANGES.txt
    pig/branches/branch-0.8/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java

Modified: pig/branches/branch-0.8/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.8/CHANGES.txt?rev=1100417&r1=1100416&r2=1100417&view=diff
==============================================================================
--- pig/branches/branch-0.8/CHANGES.txt (original)
+++ pig/branches/branch-0.8/CHANGES.txt Sat May  7 00:11:44 2011
@@ -34,6 +34,8 @@ PIG-1886: Add zookeeper jar to list of j
 
 BUG FIXES
 
+PIG-2033: Pig returns sucess for the failed Pig script (rding)
+
 PIG-1870: HBaseStorage doesn't project correctly (dvryaboy)
 
 PIG-1979: New logical plan failing with ERROR 2229: Couldn't find matching uid -1 (daijy)

Modified: pig/branches/branch-0.8/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.8/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java?rev=1100417&r1=1100416&r2=1100417&view=diff
==============================================================================
--- pig/branches/branch-0.8/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java (original)
+++ pig/branches/branch-0.8/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java Sat May  7 00:11:44 2011
@@ -350,6 +350,10 @@ public class MapReduceLauncher extends L
         // stats collection is done, log the results
         PigStatsUtil.stopCollection(true); 
         
+        // PigStatsUtil.stopCollection also computes the return code based on
+        // total jobs to run, jobs successful and jobs failed
+        failed = failed || !PigStats.get().isSuccessful();
+        
         Map<Enum, Long> warningAggMap = new HashMap<Enum, Long>();
                 
         if (succJobs != null) {