Repository: hbase Updated Branches: refs/heads/branch-1 ec86d174b -> 9574c6761
HBASE-14391 Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale (Qianxi Zhang) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9574c676 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9574c676 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9574c676 Branch: refs/heads/branch-1 Commit: 9574c67610cf30eaad58de64171726eac954be9c Parents: ec86d17 Author: Jerry He <jerry...@apache.org> Authored: Mon Sep 21 15:06:20 2015 -0700 Committer: Jerry He <jerry...@apache.org> Committed: Mon Sep 21 15:06:20 2015 -0700 ---------------------------------------------------------------------- .../java/org/apache/hadoop/hbase/master/MasterFileSystem.java | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/9574c676/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java index e648c2e..a706bcf 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java @@ -248,6 +248,10 @@ public class MasterFileSystem { FileStatus[] curLogFiles = FSUtils.listStatus(this.fs, status.getPath(), null); if (curLogFiles == null || curLogFiles.length == 0) { // Empty log folder. No recovery needed + // Just delete the directory + if (!fs.delete(status.getPath(), false)) { + LOG.warn("Unable to delete " + status.getPath()); + } continue; } final ServerName serverName = DefaultWALProvider.getServerNameFromWALDirectoryName(