Package org.apache.druid.segment.loading
Interface DataSegmentArchiver
-
public interface DataSegmentArchiverDataSegmentArchiver 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DataSegmentarchive(DataSegment segment)Perform an archive task on the segment and return the resulting segment or null if there was no action needed.DataSegmentrestore(DataSegment segment)Perform the restore from an archived segment and return the resulting segment or null if there was no action
-
-
-
Method Detail
-
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
-
-