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_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
metadata, namedXContentRegistry
-
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 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.protected boolean
isCompress()
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:BlobStoreRepository
Creates new BlobStore to read and write data.- Specified by:
createBlobStore
in classBlobStoreRepository
- Throws:
java.lang.Exception
-
isCompress
protected boolean isCompress()
Description copied from class:BlobStoreRepository
Returns true if metadata and snapshot files should be compressed- Overrides:
isCompress
in classBlobStoreRepository
- Returns:
- true if compression is needed
-
chunkSize
protected ByteSizeValue 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
protected BlobPath basePath()
Description copied from class:BlobStoreRepository
Returns base path of the repository- Specified by:
basePath
in classBlobStoreRepository
-
-