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
metadata, namedXContentRegistry, SNAPSHOT_PREFIX
-
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
-
-
Constructor Summary
Constructors Constructor Description FsRepository(RepositoryMetaData metadata, Environment environment, NamedXContentRegistry namedXContentRegistry)Constructs a shared file system repository.
-
Method Summary
Modifier and Type Method Description protected BlobPathbasePath()Returns base path of the repositoryprotected ByteSizeValuechunkSize()Returns data file chunk size.protected BlobStorecreateBlobStore()Creates new BlobStore to read and write data.protected booleanisCompress()Returns true if metadata and snapshot files should be compressed-
Methods inherited from class org.elasticsearch.repositories.blobstore.BlobStoreRepository
assertSnapshotOrGenericThread, blobContainer, blobStore, deleteSnapshot, doClose, doStart, doStop, endVerification, finalizeSnapshot, getBlobStore, getMetadata, getRepositoryData, getRestoreThrottleTimeInNanos, getShardSnapshotStatus, getSnapshotGlobalMetaData, getSnapshotIndexMetaData, getSnapshotInfo, getSnapshotThrottleTimeInNanos, initializeSnapshot, isReadOnly, restoreShard, snapshotShard, startVerification, testBlobPrefix, 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
-
-
-
-
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)
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
-
isCompress
protected boolean isCompress()
Description copied from class:BlobStoreRepositoryReturns true if metadata and snapshot files should be compressed- Overrides:
isCompressin classBlobStoreRepository- Returns:
- true if compression is needed
-
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
protected BlobPath basePath()
Description copied from class:BlobStoreRepositoryReturns base path of the repository- Specified by:
basePathin classBlobStoreRepository
-
-