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 BlobStoreRepositoryShared 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.StringTYPE-
Fields inherited from class org.elasticsearch.repositories.blobstore.BlobStoreRepository
INDEX_FILE_PREFIX, INDEX_LATEST_BLOB, metadata, METADATA_NAME_FORMAT, namedXContentRegistry, SNAPSHOT_CODEC, SNAPSHOT_NAME_FORMAT, SNAPSHOT_PREFIX, snapshotFormat, threadPool
-
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
-
-
Constructor Summary
Constructors Constructor Description FsRepository(RepositoryMetaData metadata, Environment environment, NamedXContentRegistry namedXContentRegistry, ThreadPool threadPool)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, verify, writeIndexGen
-
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
-
Methods inherited from interface org.elasticsearch.common.lease.Releasable
close
-
Methods inherited from interface org.elasticsearch.repositories.Repository
restoreShard, snapshotShard
-
-
-
-
Field Detail
-
TYPE
public static final java.lang.String TYPE
- See Also:
- Constant Field Values
-
LOCATION_SETTING
public static final Setting<java.lang.String> LOCATION_SETTING
-
REPOSITORIES_LOCATION_SETTING
public static final Setting<java.lang.String> REPOSITORIES_LOCATION_SETTING
-
CHUNK_SIZE_SETTING
public static final Setting<ByteSizeValue> CHUNK_SIZE_SETTING
-
REPOSITORIES_CHUNK_SIZE_SETTING
public static final Setting<ByteSizeValue> REPOSITORIES_CHUNK_SIZE_SETTING
-
COMPRESS_SETTING
public static final Setting<java.lang.Boolean> COMPRESS_SETTING
-
REPOSITORIES_COMPRESS_SETTING
public static final Setting<java.lang.Boolean> REPOSITORIES_COMPRESS_SETTING
-
-
Constructor Detail
-
FsRepository
public FsRepository(RepositoryMetaData metadata, Environment environment, NamedXContentRegistry namedXContentRegistry, ThreadPool threadPool)
Constructs a shared file system repository.
-
-
Method Detail
-
createBlobStore
protected BlobStore createBlobStore() throws java.lang.Exception
Description copied from class:BlobStoreRepositoryCreates new BlobStore to read and write data.- Specified by:
createBlobStorein classBlobStoreRepository- Throws:
java.lang.Exception
-
chunkSize
protected ByteSizeValue 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
public BlobPath basePath()
Description copied from class:BlobStoreRepositoryReturns base path of the repository- Specified by:
basePathin classBlobStoreRepository
-
-