Class FileRestoreContext
org.elasticsearch.repositories.blobstore.FileRestoreContext
public abstract class FileRestoreContext
extends
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
protected ShardId
protected SnapshotId
-
Constructor Summary
ModifierConstructorDescriptionprotected
repositoryName, ShardId shardId, SnapshotId snapshotId, RecoveryState recoveryState)
Constructs new restore context -
Method Summary
Modifier and TypeMethodDescriptionvoid
restore(SnapshotFiles snapshotFiles, Store store, > listener)
Performs restore operationprotected abstract void
<BlobStoreIndexShardSnapshot.FileInfo> filesToRecover, Store store, > listener)
Restores given list ofBlobStoreIndexShardSnapshot.FileInfo
to the givenStore
.Methods inherited from class java.lang.
, , , , , , , , , ,
-
Field Details
-
logger
protected static final org.apache.logging.log4j.Logger logger -
repositoryName
protected final repositoryName -
recoveryState
-
snapshotId
-
shardId
-
-
Constructor Details
-
FileRestoreContext
protected FileRestoreContext( 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(<BlobStoreIndexShardSnapshot.FileInfo> filesToRecover, Store store, > listener)Restores given list ofBlobStoreIndexShardSnapshot.FileInfo
to the givenStore
.- Parameters:
filesToRecover
- List of files to restorestore
- Store to restore into
-