diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java index 43231af..51daeb4 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java @@ -124,6 +124,8 @@ protected transient int heartbeatInterval; protected static final int NOTSKIPBIGTABLE = -1; + private transient boolean closeOpCalled = false; + /** Kryo ctor. */ protected CommonJoinOperator() { super(); @@ -193,6 +195,7 @@ public CommonJoinOperator(CommonJoinOperator clone) { @SuppressWarnings("unchecked") protected void initializeOp(Configuration hconf) throws HiveException { super.initializeOp(hconf); + closeOpCalled = false; this.handleSkewJoin = conf.getHandleSkewJoin(); this.hconf = hconf; @@ -682,6 +685,12 @@ private void genAllOneUniqueJoinObject() } protected void checkAndGenObject() throws HiveException { + if (closeOpCalled) { + LOG.warn("checkAndGenObject is called after operator " + + id + " " + getName() + " called closeOp"); + return; + } + if (condn[0].getType() == JoinDesc.UNIQUE_JOIN) { // Check if results need to be emitted. @@ -782,6 +791,7 @@ protected void reportProgress() { */ @Override public void closeOp(boolean abort) throws HiveException { + closeOpCalled = true; for (AbstractRowContainer> alw : storage) { if (alw != null) { alw.clearRows(); // clean up the temp files