pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r698786 - /incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/CombinerOptimizer.java
Date Thu, 25 Sep 2008 00:59:20 GMT
Author: gates
Date: Wed Sep 24 17:59:20 2008
New Revision: 698786

URL: http://svn.apache.org/viewvc?rev=698786&view=rev
Log:
PIG-454 Fixed CombinerOptimizer to reset state on every MapReduceOper it encounters.


Modified:
    incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/CombinerOptimizer.java

Modified: incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/CombinerOptimizer.java
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/CombinerOptimizer.java?rev=698786&r1=698785&r2=698786&view=diff
==============================================================================
--- incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/CombinerOptimizer.java
(original)
+++ incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/CombinerOptimizer.java
Wed Sep 24 17:59:20 2008
@@ -103,6 +103,7 @@
 
     @Override
     public void visitMROp(MapReduceOper mr) throws VisitorException {
+        resetState();
         log.trace("Entering CombinerOptimizer.visitMROp");
         if (mr.reducePlan.isEmpty()) return;
 
@@ -436,4 +437,10 @@
 
     }
 
+    // Reset any member variables since we may have already visited one
+    // combine.
+    private void resetState() {
+        mKeyField = -1;
+        mKeyType = 0;
+    }
 }



Mime
View raw message