Class FsRepository
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
org.elasticsearch.repositories.blobstore.BlobStoreRepository
org.elasticsearch.repositories.fs.FsRepository
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,LifecycleComponent,Releasable,Repository
public class FsRepository extends BlobStoreRepository
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
Fields Modifier and Type Field Description static Setting<ByteSizeValue>CHUNK_SIZE_SETTINGstatic Setting<java.lang.Boolean>COMPRESS_SETTINGstatic Setting<java.lang.String>LOCATION_SETTINGstatic Setting<ByteSizeValue>REPOSITORIES_CHUNK_SIZE_SETTINGstatic Setting<java.lang.Boolean>REPOSITORIES_COMPRESS_SETTINGstatic Setting<java.lang.String>REPOSITORIES_LOCATION_SETTINGstatic java.lang.StringTYPEFields inherited from class org.elasticsearch.repositories.blobstore.BlobStoreRepository
ALLOW_CONCURRENT_MODIFICATION, INDEX_FILE_PREFIX, INDEX_LATEST_BLOB, metadata, METADATA_NAME_FORMAT, METADATA_PREFIX, namedXContentRegistry, SNAPSHOT_CODEC, SNAPSHOT_NAME_FORMAT, SNAPSHOT_PREFIX, snapshotFormat, threadPool -
Constructor Summary
Constructors Constructor Description FsRepository(RepositoryMetaData metadata, Environment environment, NamedXContentRegistry namedXContentRegistry, ClusterService clusterService)Constructs a shared file system repository. -
Method Summary
Modifier and Type Method Description BlobPathbasePath()Returns base path of the repositoryprotected ByteSizeValuechunkSize()Returns data file chunk size.protected BlobStorecreateBlobStore()Creates new BlobStore to read and write data.Methods inherited from class org.elasticsearch.repositories.blobstore.BlobStoreRepository
assertSnapshotOrGenericThread, blobContainer, blobStore, cleanup, deleteSnapshot, doClose, doStart, doStop, endVerification, finalizeSnapshot, getBlobStore, getMetadata, getRepositoryData, getRestoreThrottleTimeInNanos, getShardSnapshotStatus, getSnapshotGlobalMetaData, getSnapshotIndexMetaData, getSnapshotInfo, getSnapshotThrottleTimeInNanos, initializeSnapshot, isCompress, isReadOnly, restoreShard, snapshotShard, startVerification, 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, stop
-
Field Details
-
TYPE
public static final java.lang.String 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, NamedXContentRegistry namedXContentRegistry, ClusterService clusterService)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:
java.lang.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
-