Apache9 commented on a change in pull request #330: HBASE-22617 Recovered WAL 
directories not getting cleaned up
URL: https://github.com/apache/hbase/pull/330#discussion_r296967458
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java
 ##########
 @@ -348,6 +347,13 @@ protected static void deleteFromFs(final 
MasterProcedureEnv env,
         throw new IOException("Couldn't delete mob dir " + mobTableDir);
       }
     }
+
+    // Delete the directory on wal filesystem
+    FileSystem walFs = mfs.getWALFileSystem();
+    Path tableWALDir = FSUtils.getWALTableDir(env.getMasterConfiguration(), 
tableName);
+    if (walFs.exists(tableWALDir) && !walFs.delete(tableWALDir, true)) {
+      throw new IOException("Couldn't delete table dir on wal filesystem" + 
tableWALDir);
+    }
 
 Review comment:
   Not necessary I think, at least there is no way to delete the namespace 
directories... So the users hava to use a script to delete the empty 
directories manually...

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to