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 shardfinalizeSnapshot(org.elasticsearch.cluster.metadata.SnapshotId, String, int, com.google.common.collect.ImmutableList)
with possible list of failuresModifier and Type | Method and Description |
---|---|
void |
deleteSnapshot(SnapshotId snapshotId)
Deletes snapshot
|
void |
endVerification(String verificationToken)
Called at the end of repository verification process.
|
Snapshot |
finalizeSnapshot(SnapshotId snapshotId,
String failure,
int totalShards,
com.google.common.collect.ImmutableList<SnapshotShardFailure> shardFailures)
Finalizes snapshotting process
This method is called on master after all shards are snapshotted.
|
void |
initializeSnapshot(SnapshotId snapshotId,
com.google.common.collect.ImmutableList<String> indices,
MetaData metaData)
Starts snapshotting process
|
Snapshot |
readSnapshot(SnapshotId snapshotId)
Reads snapshot description from repository.
|
MetaData |
readSnapshotMetaData(SnapshotId snapshotId,
com.google.common.collect.ImmutableList<String> indices)
Returns global metadata associate with the snapshot.
|
long |
restoreThrottleTimeInNanos()
Returns restore throttle time in nanoseconds
|
com.google.common.collect.ImmutableList<SnapshotId> |
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, stop
close
Snapshot readSnapshot(SnapshotId snapshotId)
snapshotId
- snapshot IDMetaData readSnapshotMetaData(SnapshotId snapshotId, com.google.common.collect.ImmutableList<String> indices)
snapshotId
- snapshot IDindices
- list of indicescom.google.common.collect.ImmutableList<SnapshotId> snapshots()
void initializeSnapshot(SnapshotId snapshotId, com.google.common.collect.ImmutableList<String> indices, MetaData metaData)
snapshotId
- snapshot idindices
- list of indices to be snapshottedmetaData
- cluster metadataSnapshot finalizeSnapshot(SnapshotId snapshotId, String failure, int totalShards, com.google.common.collect.ImmutableList<SnapshotShardFailure> shardFailures)
snapshotId
- snapshot idfailure
- global failure reason or nulltotalShards
- total number of shardsshardFailures
- list of shard failuresvoid deleteSnapshot(SnapshotId snapshotId)
snapshotId
- snapshot idlong snapshotThrottleTimeInNanos()
long restoreThrottleTimeInNanos()
String startVerification()
void endVerification(String verificationToken)
verificationToken
- verification request generated by startVerification()
commandCopyright © 2009–2015. All rights reserved.