Package org.apache.druid.segment.loading
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 TypeMethodDescriptionarchive(DataSegment segment) Perform an archive task on the segment and return the resulting segment or null if there was no action needed.restore(DataSegment segment) Perform the restore from an archived segment and return the resulting segment or null if there was no action
-
Method Details
-
archive
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
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
-