public interface Repository extends LifecycleComponent<Repository >
IndexShardRepository interface on data nodes.
Typical snapshot usage pattern:
#initializeSnapshot(org.elasticsearch.cluster.metadata.SnapshotId, com.google.common.collect.ImmutableList, org.elasticsearch.cluster.metadata.MetaData) with list of indices that will be included into the snapshotIndexShardRepository.snapshot(org.elasticsearch.cluster.metadata.SnapshotId, org.elasticsearch.index.shard.ShardId, org.elasticsearch.index.deletionpolicy.SnapshotIndexCommit, org.elasticsearch.index.snapshots.IndexShardSnapshotStatus) for each shard#finalizeSnapshot(org.elasticsearch.cluster.metadata.SnapshotId, String, int, com.google.common.collect.ImmutableList) with possible list of failures| Modifier and Type | Method and Description |
|---|---|
void |
deleteSnapshot(SnapshotId
Deletes snapshot
|
void |
endVerification(String
Called at the end of repository verification process.
|
Snapshot |
finalizeSnapshot(SnapshotId
Finalizes snapshotting process
This method is called on master after all shards are snapshotted.
|
void |
initializeSnapshot(SnapshotId
Starts snapshotting process
|
Snapshot |
readSnapshot(SnapshotId
Reads snapshot description from repository.
|
MetaData |
readSnapshotMetaData(SnapshotId
Returns global metadata associate with the snapshot.
|
long |
restoreThrottleTimeInNanos()
Returns restore throttle time in nanoseconds
|
<any> |
snapshots()
Returns the list of snapshots currently stored in the repository
|
long |
snapshotThrottleTimeInNanos()
Returns snapshot throttle time in nanoseconds
|
String |
startVerification()
Verifies repository on the master node and returns the verification token.
|
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stopcloseSnapshotreadSnapshot(SnapshotId snapshotId)
snapshotId - snapshot ID
MetaDatareadSnapshotMetaData(SnapshotId snapshotId, <any> indices)
snapshotId - snapshot ID
indices - list of indices
<any> snapshots()
void initializeSnapshot(SnapshotIdsnapshotId, <any> indices, MetaData metaData)
snapshotId - snapshot id
indices - list of indices to be snapshotted
metaData - cluster metadata
SnapshotfinalizeSnapshot(SnapshotId snapshotId, String failure, int totalShards, <any> shardFailures)
snapshotId - snapshot id
failure - global failure reason or null
totalShards - total number of shards
shardFailures - list of shard failures
void deleteSnapshot(SnapshotIdsnapshotId)
snapshotId - snapshot id
long snapshotThrottleTimeInNanos()
long restoreThrottleTimeInNanos()
StringstartVerification()
void endVerification(StringverificationToken)
verificationToken - verification request generated by
startVerification() command