Repository: tez
Updated Branches:
  refs/heads/branch-0.8 ebc9136ad -> c83e680e2


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


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

Branch: refs/heads/branch-0.8
Commit: c83e680e26f062fced177acebbd655f702849dd4
Parents: ebc9136
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 15:13:44 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/tez/blob/c83e680e/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 05679c4..ae69dee 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-3330. Propagate additional config parameters when running MR jobs via 
Tez.
   TEZ-3335. DAG client thinks app is still running when app status is null
@@ -514,6 +515,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/c83e680e/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 f9358bf..d4f79fe 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
@@ -235,6 +235,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);
@@ -248,12 +249,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