code: @Deprecated
    public Set<DataSegment> getInsertedSegments(final String taskid)
    {
      final Set<DataSegment> segments = new HashSet<>();
      for (final TaskAction action : storage.getAuditLogs(taskid)) {
        if (action instanceof SegmentInsertAction) {
          segments.addAll(((SegmentInsertAction) action).getSegments());
        } else if (action instanceof SegmentTransactionalInsertAction) {
          segments.addAll(((SegmentTransactionalInsertAction) action).getSegments());
        }
      }
      return segments;
    }
docs: Returns all segments created by this task.
  
  This method is useful when you want to figure out all of the things a single task spawned.  It does pose issues
  with the result set perhaps growing boundlessly and we do not do anything to protect against that.  Use at your
  own risk and know that at some point, we might adjust this to actually enforce some sort of limits.
  
  @param taskid task ID
  @return set of segments created by the specified task