public static boolean isAcid(FileSystem fileSystem, Path directory,
                               Configuration conf) throws IOException {
    FileSystem fs = fileSystem == null ? directory.getFileSystem(conf) : fileSystem;
    for(FileStatus file: fs.listStatus(directory)) {
      String filename = file.getPath().getName();
      if (filename.startsWith(BASE_PREFIX) ||
          filename.startsWith(DELTA_PREFIX) ||
          filename.startsWith(DELETE_DELTA_PREFIX)) {
        if (file.isDirectory()) {
          return true;
        }
      }
    }
    return false;
  }
Is the given directory in ACID format?
@param directory the partition directory to check
@param conf the query configuration
@return true, if it is an ACID directory
@throws IOException
ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java