public static AcidDirectory getAcidState(StorageDescriptor sd, ValidWriteIdList writeIds, HiveConf conf)
      throws IOException {
    Path location = new Path(sd.getLocation());
    FileSystem fs = location.getFileSystem(conf);
    return getAcidState(fs, location, conf, writeIds, Ref.from(false), false);
  }
GetAcidState implementation which uses the provided dirSnapshot.
Generates a new one if needed and the provided one is null.
@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
@param dirSnapshots The listed directory snapshot, if null new will be generated
@return the state of the directory
@throws IOException on filesystem errors
ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java