Skip to content

Commit

Permalink
HBASE-23740 Invalid StoreFile WARN log message printed for recovered.… (
Browse files Browse the repository at this point in the history
apache#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

(cherry picked from commit 3c3aae9)
  • Loading branch information
pankaj72981 authored and infraio committed Mar 9, 2020
1 parent 6013229 commit 0c78819
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,11 @@ public Collection<StoreFileInfo> getStoreFiles(final String familyName, final bo
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,
Expand Down Expand Up @@ -278,7 +282,11 @@ public static List<LocatedFileStatus> getStoreFilesLocatedStatus(
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);
}
Expand Down

0 comments on commit 0c78819

Please sign in to comment.