Class 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.
  • Field Details

    • 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 Details

  • Method Details

    • 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 class BlobStoreRepository
      Throws:
      java.lang.Exception
    • 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 class BlobStoreRepository
      Returns:
      chunk size
    • basePath

      public BlobPath basePath()
      Description copied from class: BlobStoreRepository
      Returns base path of the repository
      Specified by:
      basePath in class BlobStoreRepository
    • hasAtomicOverwrites

      public boolean hasAtomicOverwrites()
      Overrides:
      hasAtomicOverwrites in class BlobStoreRepository
      Returns:
      whether this repository performs overwrites atomically. In practice we only overwrite the `index.latest` blob so this is not very important, but the repository analyzer does test that overwrites happen atomically. It will skip those tests if the repository overrides this method to indicate that it does not support atomic overwrites.