public class BlobStoreIndexShardRepository extends AbstractComponent implements IndexShardRepository
| 修飾子とタイプ | クラスと説明 |
|---|---|
static interface |
BlobStoreIndexShardRepository.RateLimiterListener |
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected static String |
DATA_BLOB_PREFIX |
protected static String |
LEGACY_SNAPSHOT_NAME_FORMAT |
protected static String |
LEGACY_SNAPSHOT_PREFIX |
protected static String |
SNAPSHOT_CODEC |
protected static String |
SNAPSHOT_INDEX_CODEC |
protected static String |
SNAPSHOT_INDEX_NAME_FORMAT |
protected static String |
SNAPSHOT_INDEX_PREFIX |
protected static String |
SNAPSHOT_NAME_FORMAT |
protected static String |
SNAPSHOT_PREFIX |
deprecationLogger, logger, settings| コンストラクタと説明 |
|---|
BlobStoreIndexShardRepository(Settings settings,
RepositoryName repositoryName,
IndicesService indicesService,
ClusterService clusterService) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
delete(SnapshotId snapshotId,
Version version,
ShardId shardId)
Delete shard snapshot
|
void |
initialize(BlobStore blobStore,
BlobPath basePath,
ByteSizeValue chunkSize,
org.apache.lucene.store.RateLimiter snapshotRateLimiter,
org.apache.lucene.store.RateLimiter restoreRateLimiter,
BlobStoreIndexShardRepository.RateLimiterListener rateLimiterListener,
boolean compress)
Called by
BlobStoreRepository on repository startup |
protected boolean |
isCompress()
Returns true if metadata files should be compressed
|
void |
restore(SnapshotId snapshotId,
Version version,
ShardId shardId,
ShardId snapshotShardId,
RecoveryState recoveryState)
Restores snapshot of the shard.
|
void |
snapshot(SnapshotId snapshotId,
ShardId shardId,
SnapshotIndexCommit 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
|
String |
toString() |
void |
verify(String seed)
Verifies repository settings on data node
|
logDeprecatedSetting, logRemovedSetting, nodeNameprotected static final String LEGACY_SNAPSHOT_NAME_FORMAT
@Inject public BlobStoreIndexShardRepository(Settings settings, RepositoryName repositoryName, IndicesService indicesService, ClusterService clusterService)
public void initialize(BlobStore blobStore, BlobPath basePath, ByteSizeValue chunkSize, org.apache.lucene.store.RateLimiter snapshotRateLimiter, org.apache.lucene.store.RateLimiter restoreRateLimiter, BlobStoreIndexShardRepository.RateLimiterListener rateLimiterListener, boolean compress)
BlobStoreRepository on repository startupblobStore - blob storebasePath - base path to blob storechunkSize - chunk sizepublic void snapshot(SnapshotId snapshotId, ShardId shardId, SnapshotIndexCommit 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.
snapshot インタフェース内 IndexShardRepositorysnapshotId - snapshot idshardId - shard to be snapshottedsnapshotIndexCommit - commit pointsnapshotStatus - snapshot statuspublic void 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.
restore インタフェース内 IndexShardRepositorysnapshotId - snapshot idversion - version of elasticsearch that created this snapshotshardId - shard id (in the current index)snapshotShardId - shard id (in the snapshot)recoveryState - recovery statepublic IndexShardSnapshotStatus snapshotStatus(SnapshotId snapshotId, Version version, ShardId shardId)
snapshotStatus インタフェース内 IndexShardRepositorysnapshotId - snapshot idversion - version of elasticsearch that created this snapshotshardId - shard idpublic void verify(String seed)
IndexShardRepositoryverify インタフェース内 IndexShardRepositoryseed - value returned by Repository.startVerification()public void delete(SnapshotId snapshotId, Version version, ShardId shardId)
snapshotId - snapshot idshardId - shard idprotected boolean isCompress()
Copyright © 2009–2016. All rights reserved.