pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject svn commit: r1579463 - /pig/branches/tez/src/org/apache/pig/backend/hadoop/executionengine/tez/POValueInputTez.java
Date Wed, 19 Mar 2014 23:27:11 GMT
Author: daijy
Date: Wed Mar 19 23:27:11 2014
New Revision: 1579463

URL: http://svn.apache.org/r1579463
Log:
PIG-3789: tuple in POStream binaryInputQueue keep changing

Modified:
    pig/branches/tez/src/org/apache/pig/backend/hadoop/executionengine/tez/POValueInputTez.java

Modified: pig/branches/tez/src/org/apache/pig/backend/hadoop/executionengine/tez/POValueInputTez.java
URL: http://svn.apache.org/viewvc/pig/branches/tez/src/org/apache/pig/backend/hadoop/executionengine/tez/POValueInputTez.java?rev=1579463&r1=1579462&r2=1579463&view=diff
==============================================================================
--- pig/branches/tez/src/org/apache/pig/backend/hadoop/executionengine/tez/POValueInputTez.java
(original)
+++ pig/branches/tez/src/org/apache/pig/backend/hadoop/executionengine/tez/POValueInputTez.java
Wed Mar 19 23:27:11 2014
@@ -31,6 +31,7 @@ import org.apache.pig.backend.hadoop.exe
 import org.apache.pig.backend.hadoop.executionengine.physicalLayer.Result;
 import org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans.PhyPlanVisitor;
 import org.apache.pig.data.Tuple;
+import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.plan.OperatorKey;
 import org.apache.pig.impl.plan.VisitorException;
 import org.apache.tez.runtime.api.LogicalInput;
@@ -49,6 +50,7 @@ public class POValueInputTez extends Phy
     // TODO Change this to value only reader after implementing
     // value only input output
     private transient KeyValueReader reader;
+    protected static final TupleFactory mTupleFactory = TupleFactory.getInstance();
 
     public POValueInputTez(OperatorKey k) {
         super(k);
@@ -81,7 +83,9 @@ public class POValueInputTez extends Phy
                 return RESULT_EOP;
             }
             if (reader.next()) {
-                return new Result(POStatus.STATUS_OK, reader.getCurrentValue());
+                Tuple origTuple = (Tuple)reader.getCurrentValue();
+                Tuple copy = mTupleFactory.newTuple(origTuple.getAll());
+                return new Result(POStatus.STATUS_OK, copy);
             } else {
                 finished = true;
                 return RESULT_EOP;



Mime
View raw message