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

This commit is contained in:
stack 2014-12-27 13:09:40 -08:00
parent 8aadc5de1e
commit 317d137452
1 changed files with 5 additions and 0 deletions

View File

@ -239,6 +239,11 @@ public class MasterFileSystem {
return serverNames; return serverNames;
} }
for (FileStatus status : logFolders) { 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( final ServerName serverName = DefaultWALProvider.getServerNameFromWALDirectoryName(
status.getPath()); status.getPath());
if (null == serverName) { if (null == serverName) {