Class FsRepository
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
org.elasticsearch.repositories.blobstore.BlobStoreRepository
org.elasticsearch.repositories.fs.FsRepository
- All Implemented Interfaces:
Closeable,AutoCloseable,LifecycleComponent,org.elasticsearch.core.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 Setting<ByteSizeValue>static Setting<ByteSizeValue>static StringFields inherited from class org.elasticsearch.repositories.blobstore.BlobStoreRepository
ALLOW_CONCURRENT_MODIFICATION, bigArrays, BUFFER_SIZE_SETTING, bufferSize, CACHE_REPOSITORY_DATA, 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_NAME_FORMAT, METADATA_PREFIX, READONLY_SETTING_KEY, SNAPSHOT_FORMAT, SNAPSHOT_NAME_FORMAT, SNAPSHOT_PREFIX, SUPPORT_URL_REPO, supportURLRepo, threadPool, UPLOADED_DATA_BLOB_PREFIX, URL_REPOSITORY_TYPEFields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle -
Constructor Summary
ConstructorsConstructorDescriptionFsRepository(RepositoryMetadata metadata, Environment environment, org.elasticsearch.common.xcontent.NamedXContentRegistry namedXContentRegistry, ClusterService clusterService, BigArrays bigArrays, RecoverySettings recoverySettings)Constructs a shared file system repository. -
Method Summary
Modifier and TypeMethodDescriptionbasePath()Returns base path of the repositoryprotected ByteSizeValueReturns data file chunk size.protected BlobStoreCreates new BlobStore to read and write data.booleanMethods inherited from class org.elasticsearch.repositories.blobstore.BlobStoreRepository
assertSnapshotOrGenericThread, blobContainer, blobStore, canUpdateInPlace, cleanup, cloneShardSnapshot, deleteSnapshots, doClose, doStart, doStop, endVerification, executeConsistentStateUpdate, finalizeSnapshot, getBlobStore, getMetadata, getRepositoryData, getRestoreThrottleTimeInNanos, getShardSnapshotStatus, getSnapshotGlobalMetadata, getSnapshotIndexMetaData, getSnapshotInfo, getSnapshotThrottleTimeInNanos, initializeSnapshot, isCompress, isReadOnly, loadShardSnapshot, maybeRateLimitRestores, maybeRateLimitRestores, maybeRateLimitSnapshots, maybeRateLimitSnapshots, restoreShard, shardContainer, snapshotShard, startVerification, stats, supportURLRepo, threadPool, toString, updateState, verify, writeIndexGenMethods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, 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, removeLifecycleListener, start, stopMethods inherited from interface org.elasticsearch.core.Releasable
closeMethods inherited from interface org.elasticsearch.repositories.Repository
adaptUserMetadata, getSnapshotInfo
-
Field Details
-
TYPE
- See Also:
- Constant Field Values
-
LOCATION_SETTING
-
REPOSITORIES_LOCATION_SETTING
-
CHUNK_SIZE_SETTING
-
REPOSITORIES_CHUNK_SIZE_SETTING
-
COMPRESS_SETTING
-
REPOSITORIES_COMPRESS_SETTING
-
-
Constructor Details
-
FsRepository
public FsRepository(RepositoryMetadata metadata, Environment environment, org.elasticsearch.common.xcontent.NamedXContentRegistry namedXContentRegistry, ClusterService clusterService, BigArrays bigArrays, RecoverySettings recoverySettings)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
-
basePath
Description copied from class:BlobStoreRepositoryReturns base path of the repository- Specified by:
basePathin classBlobStoreRepository
-
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.
-