Module org.elasticsearch.xcore
Class SourceOnlySnapshotRepository
java.lang.Object
org.elasticsearch.repositories.FilterRepository
org.elasticsearch.snapshots.sourceonly.SourceOnlySnapshotRepository
- All Implemented Interfaces:
Closeable,AutoCloseable,LifecycleComponent,org.elasticsearch.core.Releasable,Repository
This is a filter snapshot repository that only snapshots the minimal required information that is needed to recreate the index. In other words instead of snapshotting the entire shard with all it's lucene indexed fields, doc values, points etc. it only snapshots the stored fields including _source and _routing as well as the live docs in oder to distinguish between live and deleted docs.
The repository can wrap any other repository delegating the source only snapshot to it to and read from it. For instance a file repository of type fs by passing settings.delegate_type=fs at repository creation time.
Snapshots restored from source only snapshots are minimal indices that are read-only and only allow match_all scroll searches in order to reindex the data.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.repositories.Repository
Repository.Factory -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidfinalizeSnapshot(FinalizeSnapshotContext finalizeSnapshotContext) static EngineFactoryReturns anEngineFactoryfor the source only snapshots.static Repository.FactoryReturns a new source only repository factorystatic Function<org.apache.lucene.index.DirectoryReader, org.apache.lucene.index.DirectoryReader> readerWrapper(EngineConfig engineConfig) voidsnapshotShard(SnapshotShardContext context) Methods inherited from class org.elasticsearch.repositories.FilterRepository
addLifecycleListener, awaitIdle, canUpdateInPlace, cloneShardSnapshot, close, deleteSnapshots, endVerification, getDelegate, getMetadata, getProjectId, getRepositoryData, getRestoreThrottleTimeInNanos, getShardSnapshotStatus, getSnapshotGlobalMetadata, getSnapshotIndexMetaData, getSnapshotInfo, getSnapshotThrottleTimeInNanos, isReadOnly, lifecycleState, restoreShard, start, startVerification, stop, updateState, verifyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.repositories.Repository
getSnapshotInfo, getUsageFeatures, stats
-
Field Details
-
SOURCE_ONLY
-
-
Method Details
-
finalizeSnapshot
- Specified by:
finalizeSnapshotin interfaceRepository- Overrides:
finalizeSnapshotin classFilterRepository
-
snapshotShard
- Specified by:
snapshotShardin interfaceRepository- Overrides:
snapshotShardin classFilterRepository
-
getEngineFactory
Returns anEngineFactoryfor the source only snapshots. -
readerWrapper
public static Function<org.apache.lucene.index.DirectoryReader,org.apache.lucene.index.DirectoryReader> readerWrapper(EngineConfig engineConfig) -
newRepositoryFactory
Returns a new source only repository factory
-