hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gunt...@apache.org
Subject svn commit: r1536918 - in /hive/branches/tez: ./ ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java
Date Tue, 29 Oct 2013 22:21:04 GMT
Author: gunther
Date: Tue Oct 29 22:21:03 2013
New Revision: 1536918

URL: http://svn.apache.org/r1536918
Log:
Merge latest trunk into branch. (Gunther Hagleitner)

Modified:
    hive/branches/tez/   (props changed)
    hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java

Propchange: hive/branches/tez/
------------------------------------------------------------------------------
  Merged /hive/trunk:r1536811-1536915

Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java?rev=1536918&r1=1536917&r2=1536918&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java Tue Oct
29 22:21:03 2013
@@ -83,6 +83,7 @@ public class MapOperator extends Operato
 
   protected transient MapOpCtx current;
   private transient List<Operator<? extends OperatorDesc>> extraChildrenToClose
= null;
+  private final Map<String, Path> normalizedPaths = new HashMap<String, Path>();
 
   private static class MapInputPath {
     String path;
@@ -467,7 +468,14 @@ public class MapOperator extends Operato
   }
 
   private Path normalizePath(String onefile) {
-    return new Path(onefile);
+    //creating Path is expensive, so cache the corresponding
+    //Path object in normalizedPaths
+    Path path = normalizedPaths.get(onefile);
+    if(path == null){
+      path = new Path(onefile);
+      normalizedPaths.put(onefile, path);
+    }
+    return path;
   }
 
   public void process(Writable value) throws HiveException {



Mime
View raw message