accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [05/11] git commit: ACCUMULO-2532 Expand on comment as to why we create this (otherwise curious) file
Date Wed, 26 Mar 2014 00:35:19 GMT
ACCUMULO-2532 Expand on comment as to why we create this (otherwise curious) file


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/9678a2c5
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/9678a2c5
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/9678a2c5

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 9678a2c51a33cc8c58969450e81c0acf40714930
Parents: 74ffff1
Author: Josh Elser <elserj@apache.org>
Authored: Tue Mar 25 16:09:50 2014 -0700
Committer: Josh Elser <elserj@apache.org>
Committed: Tue Mar 25 16:09:50 2014 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/accumulo/server/util/FileUtil.java    | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9678a2c5/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java b/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java
index 4fee83d..0f7ac22 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java
@@ -96,6 +96,8 @@ public class FileUtil {
       fs.mkdirs(result);
       
       // try to reserve the tmp dir
+      // In some versions of hadoop, two clients concurrently trying to create the same directory
might both return true
+      // Creating a file is not subject to this, so create a special file to make sure we
solely will use this directory
       if (!fs.createNewFile(new Path(result, "__reserve")))
         result = null;
     }


Mime
View raw message