hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gunt...@apache.org
Subject svn commit: r1581062 - /hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/tools/TezMergedLogicalInput.java
Date Mon, 24 Mar 2014 20:59:29 GMT
Author: gunther
Date: Mon Mar 24 20:59:29 2014
New Revision: 1581062

URL: http://svn.apache.org/r1581062
Log:
HIVE-6702: TezMergedLogicalInput needs to inform the framework when it is ready (Siddharth
Seth via Gunther Hagleitner)

Modified:
    hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/tools/TezMergedLogicalInput.java

Modified: hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/tools/TezMergedLogicalInput.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/tools/TezMergedLogicalInput.java?rev=1581062&r1=1581061&r2=1581062&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/tools/TezMergedLogicalInput.java
(original)
+++ hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/tools/TezMergedLogicalInput.java
Mon Mar 24 20:59:29 2014
@@ -17,12 +17,10 @@
  */
 package org.apache.hadoop.hive.ql.exec.tez.tools;
 
-import java.util.List;
+import java.util.IdentityHashMap;
+import java.util.Map;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.tez.runtime.api.Input;
-import org.apache.tez.runtime.api.LogicalInput;
 import org.apache.tez.runtime.api.MergedLogicalInput;
 import org.apache.tez.runtime.api.Reader;
 
@@ -32,6 +30,8 @@ import org.apache.tez.runtime.api.Reader
  */
 public class TezMergedLogicalInput extends MergedLogicalInput {
 
+  private Map<Input, Boolean> readyInputs = new IdentityHashMap<Input, Boolean>();
+  
   @Override
   public Reader getReader() throws Exception {
     return new InputMerger(getInputs());
@@ -39,6 +39,11 @@ public class TezMergedLogicalInput exten
 
   @Override
   public void setConstituentInputIsReady(Input input) {
-    // ignore notification
+    synchronized (this) {
+      readyInputs.put(input, Boolean.TRUE);
+    }
+    if (readyInputs.size() == getInputs().size()) {
+      informInputReady();
+    }
   }
 }



Mime
View raw message