pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roh...@apache.org
Subject svn commit: r1574779 - /pig/branches/tez/src/org/apache/pig/backend/hadoop/executionengine/tez/POValueInputTez.java
Date Thu, 06 Mar 2014 06:45:36 GMT
Author: rohini
Date: Thu Mar  6 06:45:36 2014
New Revision: 1574779

URL: http://svn.apache.org/r1574779
Log:
PIG-3792: POValueInputTez should handle getNextTuple even after reader.next() returns null
(daijy via rohini)

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=1574779&r1=1574778&r2=1574779&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
Thu Mar  6 06:45:36 2014
@@ -45,6 +45,7 @@ public class POValueInputTez extends Phy
     private static final long serialVersionUID = 1L;
     private static final Log LOG = LogFactory.getLog(POValueInputTez.class);
     private String inputKey;
+    private transient boolean finished = false;
     // TODO Change this to value only reader after implementing
     // value only input output
     private transient KeyValueReader reader;
@@ -76,9 +77,13 @@ public class POValueInputTez extends Phy
     @Override
     public Result getNextTuple() throws ExecException {
         try {
+            if (finished) {
+                return RESULT_EOP;
+            }
             if (reader.next()) {
                 return new Result(POStatus.STATUS_OK, reader.getCurrentValue());
             } else {
+                finished = true;
                 return RESULT_EOP;
             }
         } catch (IOException e) {



Mime
View raw message