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:10:24 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 3f1cb3e63 -> feb71872a


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

Branch: refs/heads/branch-1
Commit: feb71872a3a4cd08e70ec8bcffa771c6ec404e60
Parents: 3f1cb3e
Author: stack <stack@apache.org>
Authored: Sat Dec 27 13:09:40 2014 -0800
Committer: stack <stack@apache.org>
Committed: Sat Dec 27 13:10:13 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/feb71872/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 7650b94..93bde36 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
@@ -237,6 +237,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