Repository: tez
Updated Branches:
  refs/heads/branch-0.7 f3f52a8a0 -> b47b405d6


TEZ-3439. Tez joinvalidate fails when first input argument size is bigger than 
the second. (Hui Cao via hitesh)

(cherry picked from commit 67243a0a4e6a5c9eaf8afa64cb00f7d92831c8ac)

Conflicts:
        CHANGES.txt

(cherry picked from commit c83e680e26f062fced177acebbd655f702849dd4)

Conflicts:
        CHANGES.txt


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/b47b405d
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/b47b405d
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/b47b405d

Branch: refs/heads/branch-0.7
Commit: b47b405d62b5205bbbf0d7ce52b53293598d6648
Parents: f3f52a8
Author: Hitesh Shah <hit...@apache.org>
Authored: Tue Oct 18 15:11:21 2016 -0700
Committer: Hitesh Shah <hit...@apache.org>
Committed: Tue Oct 18 16:49:07 2016 -0700

----------------------------------------------------------------------
 CHANGES.txt                                                    | 1 +
 .../src/main/java/org/apache/tez/examples/JoinValidate.java    | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/b47b405d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index effcfe3..e82e833 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ INCOMPATIBLE CHANGES
 
 ALL CHANGES:
 
+  TEZ-3439. Tez joinvalidate fails when first input argument size is bigger 
than the second.
   TEZ-3464. Fix findbugs warnings in tez-dag mainLoop
   TEZ-3335. DAG client thinks app is still running when app status is null
   TEZ-3460. Fix precommit release audit warning.

http://git-wip-us.apache.org/repos/asf/tez/blob/b47b405d/tez-examples/src/main/java/org/apache/tez/examples/JoinValidate.java
----------------------------------------------------------------------
diff --git 
a/tez-examples/src/main/java/org/apache/tez/examples/JoinValidate.java 
b/tez-examples/src/main/java/org/apache/tez/examples/JoinValidate.java
index d7fc5ac..6397ebb 100644
--- a/tez-examples/src/main/java/org/apache/tez/examples/JoinValidate.java
+++ b/tez-examples/src/main/java/org/apache/tez/examples/JoinValidate.java
@@ -185,6 +185,7 @@ public class JoinValidate extends TezExampleBase {
       Preconditions.checkState(rhsReaderRaw instanceof KeyValuesReader);
       KeyValuesReader lhsReader = (KeyValuesReader) lhsReaderRaw;
       KeyValuesReader rhsReader = (KeyValuesReader) rhsReaderRaw;
+      boolean rhsReaderEnd = false;
 
       TezCounter lhsMissingKeyCounter = 
getContext().getCounters().findCounter(COUNTER_GROUP_NAME,
           MISSING_KEY_COUNTER_NAME);
@@ -198,12 +199,13 @@ public class JoinValidate extends TezExampleBase {
         } else {
           lhsMissingKeyCounter.increment(1);
           LOG.info("ExtraKey in lhs: " + lhsReader.getClass());
+          rhsReaderEnd = true;
           break;
         }
       }
-      if (rhsReader.next()) {
+      if (!rhsReaderEnd && rhsReader.next()) {
         lhsMissingKeyCounter.increment(1);
-        LOG.info("ExtraKey in rhs: " + lhsReader.getClass());
+        LOG.info("ExtraKey in rhs: " + rhsReader.getClass());
       }
     }
   }

Reply via email to