You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2020/10/29 22:31:45 UTC

[GitHub] [accumulo] keith-turner commented on a change in pull request #1746: Close #1739. Cleanup Splits file if CreateTable FaTE operation fails.

keith-turner commented on a change in pull request #1746:
URL: https://github.com/apache/accumulo/pull/1746#discussion_r514604929



##########
File path: server/manager/src/main/java/org/apache/accumulo/master/tableOps/create/CreateTable.java
##########
@@ -78,7 +80,13 @@ public long isReady(long tid, Master environment) throws Exception {
   }
 
   @Override
-  public void undo(long tid, Master env) {
+  public void undo(long tid, Master env) throws IOException {
+    // Clean up split files if create table operation fails
+    if(tableInfo.getInitialSplitSize() > 0) {
+      Path p = tableInfo.getSplitPath().getParent();
+      FileSystem fs = p.getFileSystem(env.getContext().getHadoopConf());
+      fs.delete(p, true);

Review comment:
       @Manno15 if this throws an Exception, then unreserveNamespace() will not execute and that may not be good. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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