java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
org.elasticsearch.repositories.blobstore.BlobStoreRepository
org.elasticsearch.repositories.fs.FsRepository
- All Implemented Interfaces:
Closeable,AutoCloseable,LifecycleComponent,Releasable,Repository
Shared file system implementation of the BlobStoreRepository
Shared file system repository supports the following settings
location- Path to the root of repository. This is mandatory parameter.
concurrent_streams- Number of concurrent read/write stream (per repository on each node). Defaults to 5.
chunk_size- Large file can be divided into chunks. This parameter specifies the chunk size. Defaults to not chucked.
compress- If set to true metadata files will be stored compressed. Defaults to false.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.repositories.Repository
Repository.Factory -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Setting<ByteSizeValue> static final Setting<ByteSizeValue> static final StringFields inherited from class org.elasticsearch.repositories.blobstore.BlobStoreRepository
bigArrays, BUFFER_SIZE_SETTING, bufferSize, CACHE_REPOSITORY_DATA, COMPRESS_SETTING, GLOBAL_METADATA_FORMAT, INDEX_FILE_PREFIX, INDEX_LATEST_BLOB, INDEX_METADATA_FORMAT, INDEX_SHARD_SNAPSHOT_FORMAT, INDEX_SHARD_SNAPSHOTS_FORMAT, MAX_RESTORE_BYTES_PER_SEC, MAX_SNAPSHOT_BYTES_PER_SEC, MAX_SNAPSHOTS_SETTING, metadata, METADATA_BLOB_NAME_SUFFIX, METADATA_NAME_FORMAT, METADATA_PREFIX, PROJECT_METADATA_FORMAT, READ_ONLY_USAGE_STATS_NAME, READ_WRITE_USAGE_STATS_NAME, READONLY_SETTING_KEY, SEARCHABLE_SNAPSHOTS_CACHE_FETCH_ASYNC_THREAD_NAME, SEARCHABLE_SNAPSHOTS_CACHE_PREWARMING_THREAD_NAME, SNAPSHOT_FORMAT, SNAPSHOT_INDEX_NAME_FORMAT, SNAPSHOT_INDEX_PREFIX, SNAPSHOT_NAME_FORMAT, SNAPSHOT_PREFIX, STATELESS_CLUSTER_STATE_READ_WRITE_THREAD_NAME, STATELESS_SHARD_PREWARMING_THREAD_NAME, STATELESS_SHARD_READ_THREAD_NAME, STATELESS_SHARD_UPLOAD_PREWARMING_THREAD_NAME, STATELESS_SHARD_WRITE_THREAD_NAME, STATELESS_TRANSLOG_THREAD_NAME, SUPPORT_URL_REPO, supportURLRepo, threadPool, UPLOADED_DATA_BLOB_PREFIX, URL_REPOSITORY_TYPE, USE_FOR_PEER_RECOVERY_SETTINGFields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle -
Constructor Summary
ConstructorsConstructorDescriptionFsRepository(ProjectId projectId, RepositoryMetadata metadata, Environment environment, NamedXContentRegistry namedXContentRegistry, ClusterService clusterService, BigArrays bigArrays, RecoverySettings recoverySettings) Constructs a shared file system repository.FsRepository(ProjectId projectId, RepositoryMetadata metadata, Environment environment, NamedXContentRegistry namedXContentRegistry, ClusterService clusterService, BigArrays bigArrays, RecoverySettings recoverySettings, SnapshotMetrics snapshotMetrics) Constructs a shared file system repository. -
Method Summary
Modifier and TypeMethodDescriptionprotected ByteSizeValueReturns data file chunk size.protected BlobStoreCreates new BlobStore to read and write data.booleanMethods inherited from class org.elasticsearch.repositories.blobstore.BlobStoreRepository
awaitIdle, basePath, blobContainer, blobStore, canUpdateInPlace, cleanup, cloneShardSnapshot, deleteSnapshots, doClose, doStart, doStop, endVerification, finalizeSnapshot, getAnalysisFailureExtraDetail, getBlobStore, getBlobStoreIndexShardSnapshots, getExtraUsageFeatures, getMetadata, getProjectId, getReadBufferSizeInBytes, getRepositoryData, getRepositoryDataBlobName, getShardSnapshotsInProgress, getShardSnapshotStatus, getSnapshotGlobalMetadata, getSnapshotIndexMetaData, getSnapshotInfo, getSnapshotStats, getUsageFeatures, isCompress, isReadOnly, loadShardSnapshot, maybeRateLimitRestores, maybeRateLimitRestores, maybeRateLimitSnapshots, maybeRateLimitSnapshots, restoreShard, shardContainer, snapshotFile, snapshotFiles, snapshotShard, startVerification, stats, supportURLRepo, threadPool, toString, updateState, verify, wrapWithWeakConsistencyProtection, writeIndexGenMethods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, start, stopMethods inherited from interface org.elasticsearch.core.Releasable
closeMethods inherited from interface org.elasticsearch.repositories.Repository
getProjectRepo, getSnapshotInfo
-
Field Details
-
TYPE
- See Also:
-
LOCATION_SETTING
-
REPOSITORIES_LOCATION_SETTING
-
CHUNK_SIZE_SETTING
-
REPOSITORIES_CHUNK_SIZE_SETTING
-
-
Constructor Details
-
FsRepository
public FsRepository(@Nullable ProjectId projectId, RepositoryMetadata metadata, Environment environment, NamedXContentRegistry namedXContentRegistry, ClusterService clusterService, BigArrays bigArrays, RecoverySettings recoverySettings) Constructs a shared file system repository. -
FsRepository
public FsRepository(@Nullable ProjectId projectId, RepositoryMetadata metadata, Environment environment, NamedXContentRegistry namedXContentRegistry, ClusterService clusterService, BigArrays bigArrays, RecoverySettings recoverySettings, SnapshotMetrics snapshotMetrics) Constructs a shared file system repository.
-
-
Method Details
-
createBlobStore
Description copied from class:BlobStoreRepositoryCreates new BlobStore to read and write data.- Specified by:
createBlobStorein classBlobStoreRepository- Throws:
Exception
-
chunkSize
Description copied from class:BlobStoreRepositoryReturns data file chunk size.This method should return null if no chunking is needed.
- Overrides:
chunkSizein classBlobStoreRepository- Returns:
- chunk size
-
hasAtomicOverwrites
public boolean hasAtomicOverwrites()- Overrides:
hasAtomicOverwritesin classBlobStoreRepository- Returns:
- whether this repository performs overwrites atomically. In practice we only overwrite the `index.latest` blob so this is not very important, but the repository analyzer does test that overwrites happen atomically. It will skip those tests if the repository overrides this method to indicate that it does not support atomic overwrites.
-