public static List<DataSegment> getCreatedSegments(Path taskDir, Configuration conf) throws IOException {
    ImmutableList.Builder<DataSegment> publishedSegmentsBuilder = ImmutableList.builder();
    FileSystem fs = taskDir.getFileSystem(conf);
    FileStatus[] fss;
    fss = fs.listStatus(taskDir);
    for (FileStatus fileStatus : fss) {
      final DataSegment segment = JSON_MAPPER.readValue((InputStream) fs.open(fileStatus.getPath()), DataSegment.class);
      publishedSegmentsBuilder.add(segment);
    }
    return publishedSegmentsBuilder.build();
  }
@param taskDir path to the  directory containing the segments descriptor info
               the descriptor path will be
               ../workingPath/task_id/{@link DruidStorageHandler#SEGMENTS_DESCRIPTOR_DIR_NAME}/*.json
@param conf    hadoop conf to get the file system
@return List of DataSegments
@throws IOException can be for the case we did not produce data.
druid-handler/src/java/org/apache/hadoop/hive/druid/DruidStorageHandlerUtils.java