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 2011/12/04 08:08:00 UTC
svn commit: r1210060 - in /pig/trunk: CHANGES.txt
src/org/apache/pig/PigServer.java test/e2e/pig/tests/nightly.conf
Author: daijy
Date: Sun Dec 4 07:07:59 2011
New Revision: 1210060
URL: http://svn.apache.org/viewvc?rev=1210060&view=rev
Log:
PIG-2385: Store statements not getting processed
Modified:
pig/trunk/CHANGES.txt
pig/trunk/src/org/apache/pig/PigServer.java
pig/trunk/test/e2e/pig/tests/nightly.conf
Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1210060&r1=1210059&r2=1210060&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Sun Dec 4 07:07:59 2011
@@ -324,6 +324,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/trunk/src/org/apache/pig/PigServer.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/PigServer.java?rev=1210060&r1=1210059&r2=1210060&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/PigServer.java (original)
+++ pig/trunk/src/org/apache/pig/PigServer.java Sun Dec 4 07:07:59 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/trunk/test/e2e/pig/tests/nightly.conf
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/tests/nightly.conf?rev=1210060&r1=1210059&r2=1210060&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/tests/nightly.conf (original)
+++ pig/trunk/test/e2e/pig/tests/nightly.conf Sun Dec 4 07:07:59 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';?,
}
],
},{