incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/2] git commit: Fixing an issue where there is a silent error during the creation of the table directory. When the directory couldn't be created thezookeeper entries would try to be added and Blur would get into a bad state.
Date Thu, 12 Sep 2013 02:01:26 GMT
Updated Branches:
  refs/heads/master f4179a3cb -> 9a3ceb9f4


Fixing an issue where there is a silent error during the creation of the table directory.
 When the directory couldn't be created thezookeeper entries would try to be added and Blur
would get into a bad state.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/3907981f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/3907981f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/3907981f

Branch: refs/heads/master
Commit: 3907981fc738c57f9c24fb0ebd1f31e1d40a17cd
Parents: 5923b8e
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Wed Sep 11 21:59:03 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Wed Sep 11 21:59:03 2013 -0400

----------------------------------------------------------------------
 blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/3907981f/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java b/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
index 1781383..8827ba2 100644
--- a/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
+++ b/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
@@ -605,7 +605,10 @@ public class BlurUtil {
   public static boolean createPath(FileSystem fileSystem, Path path) throws IOException {
     if (!fileSystem.exists(path)) {
       LOG.info("Path [{0}] does not exist, creating.", path);
-      fileSystem.mkdirs(path);
+      if (!fileSystem.mkdirs(path)) {
+        LOG.error("Path [{0}] was NOT created, make sure that you have correct permissions.",
path);
+        throw new IOException("Path [{0}] was NOT created, make sure that you have correct
permissions.");
+      }
       return false;
     }
     return true;


Mime
View raw message