hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-12763 Make it so there must be WALs for a server to be marked dead
Date Sat, 27 Dec 2014 21:09:51 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 8aadc5de1 -> 317d13745


HBASE-12763 Make it so there must be WALs for a server to be marked dead


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/317d1374
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/317d1374
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/317d1374

Branch: refs/heads/master
Commit: 317d137452c09a9a80491b23e113ee1d0c4c1c86
Parents: 8aadc5d
Author: stack <stack@apache.org>
Authored: Sat Dec 27 13:09:40 2014 -0800
Committer: stack <stack@apache.org>
Committed: Sat Dec 27 13:09:40 2014 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/master/MasterFileSystem.java   | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/317d1374/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 9bf70e9..fcfa07f 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
@@ -239,6 +239,11 @@ public class MasterFileSystem {
           return serverNames;
         }
         for (FileStatus status : logFolders) {
+          FileStatus[] curLogFiles = FSUtils.listStatus(this.fs, status.getPath(), null);
+          if (curLogFiles == null || curLogFiles.length == 0) {
+            // Empty log folder. No recovery needed
+            continue;
+          }
           final ServerName serverName = DefaultWALProvider.getServerNameFromWALDirectoryName(
               status.getPath());
           if (null == serverName) {


Mime
View raw message