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_SETTING
static Setting<java.lang.Boolean>
COMPRESS_SETTING
static Setting<java.lang.String>
LOCATION_SETTING
static Setting<ByteSizeValue>
REPOSITORIES_CHUNK_SIZE_SETTING
static Setting<java.lang.Boolean>
REPOSITORIES_COMPRESS_SETTING
static Setting<java.lang.String>
REPOSITORIES_LOCATION_SETTING
static java.lang.String
TYPE
Fields 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 BlobPath
basePath()
Returns base path of the repositoryprotected ByteSizeValue
chunkSize()
Returns data file chunk size.protected BlobStore
createBlobStore()
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, 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
-
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:BlobStoreRepository
Creates new BlobStore to read and write data.- Specified by:
createBlobStore
in classBlobStoreRepository
- Throws:
java.lang.Exception
-
chunkSize
Description copied from class:BlobStoreRepository
Returns data file chunk size.This method should return null if no chunking is needed.
- Overrides:
chunkSize
in classBlobStoreRepository
- Returns:
- chunk size
-
basePath
Description copied from class:BlobStoreRepository
Returns base path of the repository- Specified by:
basePath
in classBlobStoreRepository
-