HBASE-23740 Invalid StoreFile WARN log message printed for recovered.… (#1198)

* HBASE-23740 Invalid StoreFile WARN log message printed for recovered.hfiles directory

* HBASE-23740 Invalid StoreFile WARN log message printed for recovered.hfiles directory
This commit is contained in:
Pankaj 2020-02-26 17:52:21 +05:30 committed by GitHub
parent ecbed33092
commit 3c3aae9a2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -245,7 +245,11 @@ public class HRegionFileSystem {
ArrayList<StoreFileInfo> storeFiles = new ArrayList<>(files.length);
for (FileStatus status: files) {
if (validate && !StoreFileInfo.isValid(status)) {
LOG.warn("Invalid StoreFile: " + status.getPath());
// recovered.hfiles directory is expected inside CF path when hbase.wal.split.to.hfile to
// true, refer HBASE-23740
if (!HConstants.RECOVERED_HFILES_DIR.equals(status.getPath().getName())) {
LOG.warn("Invalid StoreFile: {}", status.getPath());
}
continue;
}
StoreFileInfo info = ServerRegionReplicaUtil.getStoreFileInfo(conf, fs, regionInfo,
@ -278,7 +282,11 @@ public class HRegionFileSystem {
List<LocatedFileStatus> validStoreFiles = Lists.newArrayList();
for (LocatedFileStatus status : locatedFileStatuses) {
if (validate && !StoreFileInfo.isValid(status)) {
LOG.warn("Invalid StoreFile: " + status.getPath());
// recovered.hfiles directory is expected inside CF path when hbase.wal.split.to.hfile to
// true, refer HBASE-23740
if (!HConstants.RECOVERED_HFILES_DIR.equals(status.getPath().getName())) {
LOG.warn("Invalid StoreFile: {}", status.getPath());
}
} else {
validStoreFiles.add(status);
}