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

This commit is contained in:
Jason Brown 2014-05-07 16:34:29 -07:00
parent e241319b23
commit d267cf88c8
1 changed files with 2 additions and 1 deletions

View File

@ -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();