hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject svn commit: r791665 - in /hadoop/hive/trunk: CHANGES.txt ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
Date Tue, 07 Jul 2009 00:55:23 GMT
Author: namit
Date: Tue Jul  7 00:55:23 2009
New Revision: 791665

URL: http://svn.apache.org/viewvc?rev=791665&view=rev
Log:
HIVE-612. Problem in removing temp files in FileSinkOperator.jobClose
(Zheng Shao via namit)


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

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=791665&r1=791664&r2=791665&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Tue Jul  7 00:55:23 2009
@@ -310,6 +310,9 @@
     HIVE-590. Pass type information in genFileSinkPlan and improve getSchema
     call in Driver. (Namit Jain via rmurthy)
 
+    HIVE-612. Problem in removing temp files in FileSinkOperator.jobClose
+    (Zheng Shao via namit)
+
 Release 0.3.1 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java?rev=791665&r1=791664&r2=791665&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java Tue Jul  7
00:55:23 2009
@@ -696,18 +696,19 @@
         if(!fs.delete(one.getPath(), true)) {
           throw new IOException ("Unable to delete tmp file: " + one.getPath());
         }
-      }
-      String taskId = getTaskIdFromFilename(one.getPath().getName());
-      FileStatus otherFile = taskIdToFile.get(taskId);
-      if (otherFile == null) {
-        taskIdToFile.put(taskId, one);
       } else {
-        if(!fs.delete(one.getPath(), true)) {
-          throw new IOException ("Unable to delete duplicate file: "
-              + one.getPath() + ". Existing file: " + otherFile.getPath());
+        String taskId = getTaskIdFromFilename(one.getPath().getName());
+        FileStatus otherFile = taskIdToFile.get(taskId);
+        if (otherFile == null) {
+          taskIdToFile.put(taskId, one);
         } else {
-          LOG.warn("Duplicate taskid file removed: " + one.getPath() 
-              + ". Existing file: " + otherFile.getPath());
+          if(!fs.delete(one.getPath(), true)) {
+            throw new IOException ("Unable to delete duplicate file: "
+                + one.getPath() + ". Existing file: " + otherFile.getPath());
+          } else {
+            LOG.warn("Duplicate taskid file removed: " + one.getPath() 
+                + ". Existing file: " + otherFile.getPath());
+          }
         }
       }
     }



Mime
View raw message