public static boolean isValid(final FileStatus fileStatus) throws IOException {
    final Path p = fileStatus.getPath();

    if (fileStatus.isDirectory()) {
      return false;
    }

    // Check for empty hfile. Should never be the case but can happen
    // after data loss in hdfs for whatever reason (upgrade, etc.): HBASE-646
    // NOTE: that the HFileLink is just a name, so it's an empty file.
    if (!HFileLink.isHFileLink(p) && fileStatus.getLen() <= 0) {
      LOG.warn("Skipping {} because it is empty. HBASE-646 DATA LOSS?", p);
      return false;
    }

    return validateStoreFileName(p.getName());
  }
Return if the specified file is a valid store file or not.
@param fileStatus The {@link FileStatus} of the file
@return <tt>true</tt> if the file is valid
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileInfo.java