Class FileRestoreContext
java.lang.Object
org.elasticsearch.repositories.blobstore.FileRestoreContext
This context will execute a file restore of the lucene files. It is primarily designed to be used to
restore from some form of a snapshot. It will setup a new store, identify files that need to be copied
for the source, and perform the copies. Implementers must implement the functionality of opening the
underlying file streams for snapshotted lucene file.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static org.apache.logging.log4j.Logger
protected RecoveryState
protected String
protected ShardId
protected SnapshotId
-
Constructor Summary
ModifierConstructorDescriptionprotected
FileRestoreContext(String repositoryName, ShardId shardId, SnapshotId snapshotId, RecoveryState recoveryState)
Constructs new restore context -
Method Summary
Modifier and TypeMethodDescriptionvoid
restore(SnapshotFiles snapshotFiles, Store store, ActionListener<Void> listener)
Performs restore operationprotected abstract void
restoreFiles(List<BlobStoreIndexShardSnapshot.FileInfo> filesToRecover, Store store, ActionListener<Void> listener)
Restores given list ofBlobStoreIndexShardSnapshot.FileInfo
to the givenStore
.
-
Field Details
-
logger
protected static final org.apache.logging.log4j.Logger logger -
repositoryName
-
recoveryState
-
snapshotId
-
shardId
-
-
Constructor Details
-
FileRestoreContext
protected FileRestoreContext(String repositoryName, ShardId shardId, SnapshotId snapshotId, RecoveryState recoveryState)Constructs new restore context- Parameters:
shardId
- shard id to restore intosnapshotId
- snapshot idrecoveryState
- recovery state to report progress
-
-
Method Details
-
restore
Performs restore operation -
restoreFiles
protected abstract void restoreFiles(List<BlobStoreIndexShardSnapshot.FileInfo> filesToRecover, Store store, ActionListener<Void> listener)Restores given list ofBlobStoreIndexShardSnapshot.FileInfo
to the givenStore
.- Parameters:
filesToRecover
- List of files to restorestore
- Store to restore into
-