private static boolean isCompactedBase(ParsedBaseLight parsedBase, FileSystem fs,
      Map<Path, HdfsDirSnapshot> snapshotMap) throws IOException {
    return isCompactedBase(parsedBase, fs, snapshotMap != null ? snapshotMap.get(parsedBase.getBaseDirPath()) : null);
  }
Returns {@code true} if {@code parsedBase} was created by compaction.
As of Hive 4.0 we can tell if a directory is a result of compaction based on the
presence of {@link AcidUtils#VISIBILITY_PATTERN} suffix.  Base directories written prior to
that, have to rely on the {@link MetaDataFile} in the directory. So look at the filename first
since that is the cheaper test.
ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java