public static AcidDirectory getAcidState(FileSystem fileSystem, Path candidateDirectory, Configuration conf,
      ValidWriteIdList writeIdList, Ref<Boolean> useFileIds, boolean ignoreEmptyFiles) throws IOException {
    return getAcidState(fileSystem, candidateDirectory, conf, writeIdList, useFileIds, ignoreEmptyFiles, null);
  }
Get the ACID state of the given directory. It finds the minimal set of
base and diff directories. Note that because major compactions don't
preserve the history, we can't use a base directory that includes a
write id that we must exclude.
@param fileSystem optional, it it is not provided, it will be derived from the candidateDirectory
@param candidateDirectory the partition directory to analyze
@param conf the configuration
@param writeIdList the list of write ids that we are reading
@param useFileIds It will be set to true, if the FileSystem supports listing with fileIds
@param ignoreEmptyFiles Ignore files with 0 length
@return the state of the directory
@throws IOException on filesystem errors
ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java