hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerry...@apache.org
Subject hbase git commit: HBASE-14391 Empty regionserver WAL will never be deleted although the coresponding regionserver has been stale (Qianxi Zhang)
Date Mon, 21 Sep 2015 22:10:44 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 ec1215707 -> 7e9f7b53a


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/7e9f7b53
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7e9f7b53
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7e9f7b53

Branch: refs/heads/branch-1.2
Commit: 7e9f7b53a2c3900ba7a305dd8effab252c55e8f4
Parents: ec12157
Author: Jerry He <jerryjch@apache.org>
Authored: Mon Sep 21 15:10:35 2015 -0700
Committer: Jerry He <jerryjch@apache.org>
Committed: Mon Sep 21 15:10:35 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/7e9f7b53/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(


Mime
View raw message