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:40:34 UTC

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

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



##########
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:
       I can add a log for it if it is necessary but I should also add a check to make sure there is even a split file to begin with... I will add that.




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