accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] jmark99 commented on a change in pull request #575: Add splits to table at time of table creation #573
Date Wed, 05 Sep 2018 13:44:30 GMT
jmark99 commented on a change in pull request #575: Add splits to table at time of table creation
#573
URL: https://github.com/apache/accumulo/pull/575#discussion_r215274787
 
 

 ##########
 File path: server/master/src/main/java/org/apache/accumulo/master/tableOps/CreateDir.java
 ##########
 @@ -47,5 +58,23 @@ public void undo(long tid, Master master) throws Exception {
     VolumeManager fs = master.getFileSystem();
     fs.deleteRecursively(new Path(tableInfo.dir));
 
+    if (tableInfo.initialSplitSize > 0) {
+      SortedSet<Text> dirInfo = Utils
+          .getSortedSetFromFile(master.getInputStream(tableInfo.splitDirsFile), false);
+      for (Text dirname : dirInfo) {
+        fs.deleteRecursively(new Path(dirname.toString()));
+      }
+    }
+  }
+
+  private void createTabletDirectories(VolumeManager fs, SortedSet<Text> dirInfo)
+      throws IOException {
+
+    for (Text info : dirInfo) {
+      if (fs.exists(new Path(info.toString())))
 
 Review comment:
   Thanks for catching that. There is no need to fail if the directory already exists upon
retry.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message