hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject svn commit: r1001979 - in /hadoop/hive/trunk: CHANGES.txt ql/src/java/org/apache/hadoop/hive/ql/Context.java
Date Tue, 28 Sep 2010 00:35:14 GMT
Author: namit
Date: Tue Sep 28 00:35:13 2010
New Revision: 1001979

URL: http://svn.apache.org/viewvc?rev=1001979&view=rev
Log:
HIVE-1671 multithreading on Context.pathToCS
(Bennie Schut via namit)


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

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=1001979&r1=1001978&r2=1001979&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Tue Sep 28 00:35:13 2010
@@ -78,7 +78,7 @@ Trunk -  Unreleased
     (Ajay Kidave via jvs)
 
     HIVE-1661. Default values for parameters
-    (Siying Dong via He Yongqiang) 
+    (Siying Dong via He Yongqiang)
 
     HIVE-1659. parse_url_tuple: a UDTF version of parse_url
     (Xing Jin via Ning Zhang)
@@ -306,6 +306,9 @@ Trunk -  Unreleased
     HIVE-1664. Eclipse build broken
     (Steven Wong via jvs)
 
+    HIVE-1671 multithreading on Context.pathToCS
+    (Bennie Schut via namit)
+
   TESTS
 
     HIVE-1464. improve  test query performance

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/Context.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/Context.java?rev=1001979&r1=1001978&r2=1001979&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/Context.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/Context.java Tue Sep 28 00:35:13
2010
@@ -30,7 +30,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Random;
-import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.antlr.runtime.TokenRewriteStream;
 import org.apache.commons.logging.Log;
@@ -59,7 +59,7 @@ public class Context {
   private int resDirFilesNum;
   boolean initialized;
   String originalTracker = null;
-  private HashMap<String, ContentSummary> pathToCS;
+  private Map<String, ContentSummary> pathToCS = new ConcurrentHashMap<String, ContentSummary>();
 
   // scratch path to use for all non-local (ie. hdfs) file system tmp folders
   private final Path nonLocalScratchPath;
@@ -495,14 +495,10 @@ public class Context {
   }
 
   public void addCS(String path, ContentSummary cs) {
-    if(pathToCS == null)
-      pathToCS = new HashMap<String, ContentSummary> ();
     pathToCS.put(path, cs);
   }
 
   public ContentSummary getCS(String path) {
-    if(pathToCS == null)
-      pathToCS = new HashMap<String, ContentSummary> ();
     return pathToCS.get(path);
   }
 



Mime
View raw message