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, 03 Jan 2015 19:06:59 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.0 a32f485fe -> c7b6e10ec


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

Branch: refs/heads/branch-1.0
Commit: c7b6e10ec7c154c7f22d3231027b20a9d2904025
Parents: a32f485
Author: stack <stack@apache.org>
Authored: Sat Jan 3 11:06:47 2015 -0800
Committer: stack <stack@apache.org>
Committed: Sat Jan 3 11:06:47 2015 -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/c7b6e10e/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