From 3c3aae9a2f35bf63c7a10374701f89c0aa8b71a4 Mon Sep 17 00:00:00 2001 From: Pankaj Date: Wed, 26 Feb 2020 17:52:21 +0530 Subject: [PATCH] =?UTF-8?q?HBASE-23740=20Invalid=20StoreFile=20WARN=20log?= =?UTF-8?q?=20message=20printed=20for=20recovered.=E2=80=A6=20(#1198)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * HBASE-23740 Invalid StoreFile WARN log message printed for recovered.hfiles directory * HBASE-23740 Invalid StoreFile WARN log message printed for recovered.hfiles directory --- .../hadoop/hbase/regionserver/HRegionFileSystem.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java index 3f699fb683a..8402a646b73 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java @@ -245,7 +245,11 @@ public class HRegionFileSystem { ArrayList 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 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); }