You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by su...@apache.org on 2016/07/29 20:18:03 UTC

hive git commit: HIVE-14303: CommonJoinOperator.checkAndGenObject should return directly at CLOSE state to avoid NPE if ExecReducer.close is called twice. (Zhihai Xu, reviewed by Xuefu Zhang)

Repository: hive
Updated Branches:
  refs/heads/master c6aa5552c -> 529814e3d


HIVE-14303: CommonJoinOperator.checkAndGenObject should return directly at CLOSE state to avoid NPE if ExecReducer.close is called twice. (Zhihai Xu, reviewed by Xuefu Zhang)


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

Branch: refs/heads/master
Commit: 529814e3d0bfaefdf3f1625d014d9e05149f5ccf
Parents: c6aa555
Author: Zhihai Xu <zh...@gmail.com>
Authored: Fri Jul 29 13:17:33 2016 -0700
Committer: Chao Sun <su...@apache.org>
Committed: Fri Jul 29 13:17:33 2016 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java     | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/529814e3/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java
index 43231af..5446c40 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java
@@ -682,6 +682,12 @@ public abstract class CommonJoinOperator<T extends JoinDesc> extends
   }
 
   protected void checkAndGenObject() throws HiveException {
+    if (state == State.CLOSE) {
+      LOG.warn("checkAndGenObject is called after operator " +
+          id + " " + getName() + " closed");
+      return;
+    }
+
     if (condn[0].getType() == JoinDesc.UNIQUE_JOIN) {
 
       // Check if results need to be emitted.