Search in sources :

Example 1 with FsBlobStore

use of org.elasticsearch.common.blobstore.fs.FsBlobStore in project elasticsearch by elastic.

the class FsBlobStoreContainerTests method newBlobStore.

protected BlobStore newBlobStore() throws IOException {
    Path tempDir = createTempDir();
    Settings settings = randomBoolean() ? Settings.EMPTY : Settings.builder().put("buffer_size", new ByteSizeValue(randomIntBetween(1, 100), ByteSizeUnit.KB)).build();
    return new FsBlobStore(settings, tempDir);
}
Also used : Path(java.nio.file.Path) FsBlobStore(org.elasticsearch.common.blobstore.fs.FsBlobStore) ByteSizeValue(org.elasticsearch.common.unit.ByteSizeValue) Settings(org.elasticsearch.common.settings.Settings)

Example 2 with FsBlobStore

use of org.elasticsearch.common.blobstore.fs.FsBlobStore in project elasticsearch by elastic.

the class FsBlobStoreTests method newBlobStore.

protected BlobStore newBlobStore() throws IOException {
    Path tempDir = createTempDir();
    Settings settings = randomBoolean() ? Settings.EMPTY : Settings.builder().put("buffer_size", new ByteSizeValue(randomIntBetween(1, 100), ByteSizeUnit.KB)).build();
    return new FsBlobStore(settings, tempDir);
}
Also used : Path(java.nio.file.Path) FsBlobStore(org.elasticsearch.common.blobstore.fs.FsBlobStore) ByteSizeValue(org.elasticsearch.common.unit.ByteSizeValue) Settings(org.elasticsearch.common.settings.Settings)

Example 3 with FsBlobStore

use of org.elasticsearch.common.blobstore.fs.FsBlobStore in project crate by crate.

the class FsRepository method createBlobStore.

@Override
protected BlobStore createBlobStore() throws Exception {
    final String location = REPOSITORIES_LOCATION_SETTING.get(getMetadata().settings());
    final Path locationFile = environment.resolveRepoFile(location);
    return new FsBlobStore(environment.settings(), locationFile);
}
Also used : Path(java.nio.file.Path) BlobPath(org.elasticsearch.common.blobstore.BlobPath) FsBlobStore(org.elasticsearch.common.blobstore.fs.FsBlobStore)

Aggregations

Path (java.nio.file.Path)3 FsBlobStore (org.elasticsearch.common.blobstore.fs.FsBlobStore)3 Settings (org.elasticsearch.common.settings.Settings)2 ByteSizeValue (org.elasticsearch.common.unit.ByteSizeValue)2 BlobPath (org.elasticsearch.common.blobstore.BlobPath)1