hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nzh...@apache.org
Subject svn commit: r938713 - in /hadoop/hive/trunk: CHANGES.txt ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/RowContainer.java
Date Tue, 27 Apr 2010 22:52:28 GMT
Author: nzhang
Date: Tue Apr 27 22:52:28 2010
New Revision: 938713

URL: http://svn.apache.org/viewvc?rev=938713&view=rev
Log:
HIVE-1326. RowContainer users hard-coded /tmp path for temporary files

Modified:
    hadoop/hive/trunk/CHANGES.txt
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/RowContainer.java

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=938713&r1=938712&r2=938713&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Tue Apr 27 22:52:28 2010
@@ -397,6 +397,9 @@ Trunk -  Unreleased
     columns + dynamic partition columns does not equal to the number of select columns
     (Ning Zhang via namit)
 
+    HIVE-1326. RowContainer uses hard-coded /tmp path for temporary files
+    (Michael Klatt via Ning Zhang)
+
 Release 0.5.0 -  Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/RowContainer.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/RowContainer.java?rev=938713&r1=938712&r2=938713&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/RowContainer.java
(original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/RowContainer.java
Tue Apr 27 22:52:28 2010
@@ -295,9 +295,8 @@ public class RowContainer<Row extends Li
         }
 
         while (true) {
-          String parentId = "hive-rowcontainer" + Utilities.randGen.nextInt();
-          parentFile = new File("/tmp/" + parentId);
-          boolean success = parentFile.mkdir();
+          parentFile = File.createTempFile("hive-rowcontainer", "");
+          boolean success = parentFile.delete() && parentFile.mkdir();
           if (success) {
             break;
           }



Mime
View raw message