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/21 15:09:04 UTC

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

dlmarion commented on a change in pull request #1746:
URL: https://github.com/apache/accumulo/pull/1746#discussion_r509370371



##########
File path: server/manager/src/main/java/org/apache/accumulo/master/tableOps/create/CreateTable.java
##########
@@ -78,7 +79,11 @@ 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 Exception {
+    // Clean up split files if create table operation fails
+    Path p = tableInfo.getSplitPath().getParent();
+    FileSystem fs = p.getFileSystem(env.getContext().getHadoopConf());
+    fs.delete(p, true);

Review comment:
       returns boolean, should we log when delete fails?




----------------------------------------------------------------
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