pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject svn commit: r1210059 - in /pig/branches/branch-0.10: CHANGES.txt src/org/apache/pig/PigServer.java test/e2e/pig/tests/nightly.conf
Date Sun, 04 Dec 2011 07:07:19 GMT
Author: daijy
Date: Sun Dec  4 07:07:18 2011
New Revision: 1210059

URL: http://svn.apache.org/viewvc?rev=1210059&view=rev
Log:
PIG-2385: Store statements not getting processed

Modified:
    pig/branches/branch-0.10/CHANGES.txt
    pig/branches/branch-0.10/src/org/apache/pig/PigServer.java
    pig/branches/branch-0.10/test/e2e/pig/tests/nightly.conf

Modified: pig/branches/branch-0.10/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.10/CHANGES.txt?rev=1210059&r1=1210058&r2=1210059&view=diff
==============================================================================
--- pig/branches/branch-0.10/CHANGES.txt (original)
+++ pig/branches/branch-0.10/CHANGES.txt Sun Dec  4 07:07:18 2011
@@ -296,6 +296,8 @@ Release 0.9.2 - Unreleased
 
 BUG FIXES
 
+PIG-2385: Store statements not getting processed (daijy)
+
 PIG-2320: Error: "projection with nothing to reference" (daijy)
 
 PIG-2346: TypeCastInsert should not insert Foreach if there is no as statement (daijy)

Modified: pig/branches/branch-0.10/src/org/apache/pig/PigServer.java
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.10/src/org/apache/pig/PigServer.java?rev=1210059&r1=1210058&r2=1210059&view=diff
==============================================================================
--- pig/branches/branch-0.10/src/org/apache/pig/PigServer.java (original)
+++ pig/branches/branch-0.10/src/org/apache/pig/PigServer.java Sun Dec  4 07:07:18 2011
@@ -1233,17 +1233,17 @@ public class PigServer {
         if( jobPriority != null ) {
             pigContext.getProperties().setProperty( PigContext.JOB_PRIORITY, jobPriority
);
         }
-        
-       currDAG.compile();
+       
+        // In this plan, all stores in the plan will be executed. They should be ignored
if the plan is reused.
+        currDAG.countExecutedStores();
+       
+        currDAG.compile();
 
         if( currDAG.lp.size() == 0 ) {
             return PigStatsUtil.getEmptyPigStats();
         }
-
-        PigStats stats = executeCompiledLogicalPlan();
         
-        // At this point, all stores in the plan are executed. They should be ignored if
the plan is reused.
-        currDAG.executed();
+        PigStats stats = executeCompiledLogicalPlan();
         
         return stats;
     }
@@ -1360,9 +1360,9 @@ public class PigServer {
         };
 
         /**
-         * Call back method for post execution processing.
+         * Call back method for counting executed stores.
          */
-        private void executed() {
+        private void countExecutedStores() {
             for( Operator sink : lp.getSinks() ) {
                 if( sink instanceof LOStore ) {
                     processedStores++;

Modified: pig/branches/branch-0.10/test/e2e/pig/tests/nightly.conf
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.10/test/e2e/pig/tests/nightly.conf?rev=1210059&r1=1210058&r2=1210059&view=diff
==============================================================================
--- pig/branches/branch-0.10/test/e2e/pig/tests/nightly.conf (original)
+++ pig/branches/branch-0.10/test/e2e/pig/tests/nightly.conf Sun Dec  4 07:07:18 2011
@@ -3880,6 +3880,17 @@ store E into ':OUTPATH:';\, 
                                 C = group B all;
                                 D = foreach C generate group, COR(B.age, B.gpa, B.gpa2);
                                 store D into ':OUTPATH:';?,
+                    }, {
+                        # PIG-2385
+                        'num' => 3,
+                        'pig_params' => ['-M'],
+                        'pig' => q?A = LOAD ':INPATH:/singlefile/studenttab10k' AS (name:chararray,
age:int,gpa:double);
+                                Z = group A all;
+                                Z1 = foreach Z generate AVG(A.gpa) as avg;
+                                B = foreach A generate name, age, gpa-Z1.avg as diff;
+                                STORE B INTO ':OUTPATH:.1';
+                                C = DISTINCT B ;
+                                store C into ':OUTPATH:.2';?,
                     }
                 ],
             },{



Mime
View raw message