Interface DataSegmentArchiver


public interface DataSegmentArchiver
DataSegmentArchiver knows how to archive segments. Since any implementation of DataSegmentArchiver is initialized when an ingestion job starts if a deep storage extension is loaded even when that deep storage is actually not used, implementations should avoid initializing the deep storage client immediately but defer it until the deep storage client is actually used.
  • Method Summary

    Modifier and Type
    Method
    Description
    Perform an archive task on the segment and return the resulting segment or null if there was no action needed.
    Perform the restore from an archived segment and return the resulting segment or null if there was no action
  • Method Details

    • archive

      @Nullable DataSegment archive(DataSegment segment) throws SegmentLoadingException
      Perform an archive task on the segment and return the resulting segment or null if there was no action needed.
      Parameters:
      segment - The source segment
      Returns:
      The segment after archiving or `null` if there was no archiving performed.
      Throws:
      SegmentLoadingException - on error
    • restore

      @Nullable DataSegment restore(DataSegment segment) throws SegmentLoadingException
      Perform the restore from an archived segment and return the resulting segment or null if there was no action
      Parameters:
      segment - The source (archived) segment
      Returns:
      The segment after it has been unarchived
      Throws:
      SegmentLoadingException - on error