public interface IndexShardRepository
IndexShardRepository is used on data node to create snapshots of individual shards. See Repository
for more information.
Modifier and Type | Method and Description |
---|---|
void |
restore(SnapshotId snapshotId,
Version version,
ShardId shardId,
ShardId snapshotShardId,
RecoveryState recoveryState)
Restores snapshot of the shard.
|
void |
snapshot(SnapshotId snapshotId,
ShardId shardId,
org.apache.lucene.index.IndexCommit snapshotIndexCommit,
IndexShardSnapshotStatus snapshotStatus)
Creates a snapshot of the shard based on the index commit point.
|
IndexShardSnapshotStatus |
snapshotStatus(SnapshotId snapshotId,
Version version,
ShardId shardId)
Retrieve shard snapshot status for the stored snapshot
|
void |
verify(java.lang.String verificationToken)
Verifies repository settings on data node
|
void snapshot(SnapshotId snapshotId, ShardId shardId, org.apache.lucene.index.IndexCommit snapshotIndexCommit, IndexShardSnapshotStatus snapshotStatus)
The index commit point can be obtained by using Engine.snapshotIndex(boolean)
method.
IndexShardRepository implementations shouldn't release the snapshot index commit point. It is done by the method caller.
As snapshot process progresses, implementation of this method should update IndexShardSnapshotStatus
object and check
IndexShardSnapshotStatus.aborted()
to see if the snapshot process should be aborted.
snapshotId
- snapshot idshardId
- shard to be snapshottedsnapshotIndexCommit
- commit pointsnapshotStatus
- snapshot statusvoid restore(SnapshotId snapshotId, Version version, ShardId shardId, ShardId snapshotShardId, RecoveryState recoveryState)
The index can be renamed on restore, hence different shardId
and snapshotShardId
are supplied.
snapshotId
- snapshot idshardId
- shard id (in the current index)version
- version of elasticsearch that created this snapshotsnapshotShardId
- shard id (in the snapshot)recoveryState
- recovery stateIndexShardSnapshotStatus snapshotStatus(SnapshotId snapshotId, Version version, ShardId shardId)
snapshotId
- snapshot idversion
- version of elasticsearch that created this snapshotshardId
- shard idvoid verify(java.lang.String verificationToken)
verificationToken
- value returned by Repository.startVerification()