hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r712311 - in /hadoop/core/trunk: CHANGES.txt src/core/org/apache/hadoop/fs/s3native/NativeS3FileSystem.java
Date Fri, 07 Nov 2008 23:44:15 GMT
Author: cdouglas
Date: Fri Nov  7 15:44:14 2008
New Revision: 712311

URL: http://svn.apache.org/viewvc?rev=712311&view=rev
Log:
HADOOP-4377. Fix a race condition in directory creation in
NativeS3FileSystem. Contributed by David Phillips.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3native/NativeS3FileSystem.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=712311&r1=712310&r2=712311&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Fri Nov  7 15:44:14 2008
@@ -101,6 +101,9 @@
     HADOOP-4530. In fsck, HttpServletResponse sendError fails with
     IllegalStateException. (hairong)
 
+    HADOOP-4377. Fix a race condition in directory creation in
+    NativeS3FileSystem. (David Phillips via cdouglas)
+
 Release 0.19.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3native/NativeS3FileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3native/NativeS3FileSystem.java?rev=712311&r1=712310&r2=712311&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3native/NativeS3FileSystem.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3native/NativeS3FileSystem.java Fri Nov
 7 15:44:14 2008
@@ -148,7 +148,7 @@
 
     private File newBackupFile() throws IOException {
       File dir = new File(conf.get("fs.s3.buffer.dir"));
-      if (!dir.exists() && !dir.mkdirs()) {
+      if (!dir.mkdirs() && !dir.exists()) {
         throw new IOException("Cannot create S3 buffer directory: " + dir);
       }
       File result = File.createTempFile("output-", ".tmp", dir);



Mime
View raw message