hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nzh...@apache.org
Subject svn commit: r947782 - in /hadoop/hive/trunk: CHANGES.txt ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java
Date Mon, 24 May 2010 20:13:36 GMT
Author: nzhang
Date: Mon May 24 20:13:36 2010
New Revision: 947782

URL: http://svn.apache.org/viewvc?rev=947782&view=rev
Log:
HIVE-1350. hive.query.id is not unique (Namit Jain via Ning Zhang)

Modified:
    hadoop/hive/trunk/CHANGES.txt
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=947782&r1=947781&r2=947782&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Mon May 24 20:13:36 2010
@@ -453,6 +453,9 @@ Trunk -  Unreleased
     HIVE-1357. optimize CombineHiveInputFormat to cache inputFormat
     (Ning Zhang via namit)
 
+    HIVE-1350. hive.query.id is not unique
+    (Namit Jain via Ning Zhang)
+
 Release 0.5.0 -  Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java?rev=947782&r1=947781&r2=947782&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java Mon May 24 20:13:36
2010
@@ -31,6 +31,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Queue;
 import java.util.Set;
+import java.util.UUID;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -65,13 +66,13 @@ public class QueryPlan implements Serial
 
   private ArrayList<Task<? extends Serializable>> rootTasks;
   private FetchTask fetchTask;
-  
+
   private HashSet<ReadEntity> inputs;
   /**
    * Note: outputs are not all determined at compile time.
    * Some of the tasks can change the outputs at run time, because only at run
-   * time, we know what are the changes.  These tasks should keep a reference 
-   * to the outputs here. 
+   * time, we know what are the changes.  These tasks should keep a reference
+   * to the outputs here.
    */
   private HashSet<WriteEntity> outputs;
   /**
@@ -128,13 +129,15 @@ public class QueryPlan implements Serial
         + String.format("%1$4d%2$02d%3$02d%4$02d%5$02d%5$02d", gc
         .get(Calendar.YEAR), gc.get(Calendar.MONTH) + 1, gc
         .get(Calendar.DAY_OF_MONTH), gc.get(Calendar.HOUR_OF_DAY), gc
-        .get(Calendar.MINUTE), gc.get(Calendar.SECOND));
+        .get(Calendar.MINUTE), gc.get(Calendar.SECOND))
+        + "_"
+        + UUID.randomUUID().toString();
   }
 
   /**
    * generate the operator graph and operator list for the given task based on
    * the operators corresponding to that task.
-   * 
+   *
    * @param task
    *          api.Task which needs its operator graph populated
    * @param topOps
@@ -182,7 +185,7 @@ public class QueryPlan implements Serial
   /**
    * Populate api.QueryPlan from exec structures. This includes constructing the
    * dependency graphs of stages and operators.
-   * 
+   *
    * @throws IOException
    */
   private void populateQueryPlan() throws IOException {
@@ -719,19 +722,19 @@ public class QueryPlan implements Serial
 
   /**
    * Gets the lineage information.
-   * 
+   *
    * @return LineageInfo associated with the query.
    */
   public LineageInfo getLineageInfo() {
     return linfo;
   }
-  
+
   /**
    * Sets the lineage information.
-   * 
+   *
    * @param linfo The LineageInfo structure that is set in the optimization phase.
    */
   public void setLineageInfo(LineageInfo linfo) {
     this.linfo = linfo;
-  }  
+  }
 }



Mime
View raw message