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
FieldsModifier and TypeFieldDescriptionprotected static org.apache.logging.log4j.Loggerprotected RecoveryStateprotected Stringprotected ShardIdprotected SnapshotId -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFileRestoreContext(String repositoryName, ShardId shardId, SnapshotId snapshotId, RecoveryState recoveryState)Constructs new restore context -
Method Summary
Modifier and TypeMethodDescriptionvoidrestore(SnapshotFiles snapshotFiles, Store store, ActionListener<Void> listener)Performs restore operationprotected abstract voidrestoreFiles(List<BlobStoreIndexShardSnapshot.FileInfo> filesToRecover, Store store, ActionListener<Void> listener)Restores given list ofBlobStoreIndexShardSnapshot.FileInfoto 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.FileInfoto the givenStore.- Parameters:
filesToRecover- List of files to restorestore- Store to restore into
-