cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasobr...@apache.org
Subject git commit: make sure manifest's parent dirs exist before trying to write the file.
Date Wed, 07 May 2014 23:34:55 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 e241319b2 -> d267cf88c


make sure manifest's parent dirs exist before trying to write the file.


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

Branch: refs/heads/cassandra-2.1
Commit: d267cf88c870a05efc9109a53b51b8628b4dfe48
Parents: e241319
Author: Jason Brown <jasobrown@apple.com>
Authored: Wed May 7 16:34:29 2014 -0700
Committer: Jason Brown <jasobrown@apple.com>
Committed: Wed May 7 16:34:29 2014 -0700

----------------------------------------------------------------------
 src/java/org/apache/cassandra/db/ColumnFamilyStore.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d267cf88/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 33b7303..417a5b4 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -2171,9 +2171,10 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
         final JSONObject manifestJSON = new JSONObject();
         manifestJSON.put("files", filesJSONArr);
 
-
         try
         {
+            if (!manifestFile.getParentFile().exists())
+                manifestFile.getParentFile().mkdirs();
             PrintStream out = new PrintStream(manifestFile);
             out.println(manifestJSON.toJSONString());
             out.close();


Mime
View raw message