Package org.elasticsearch.common.blobstore

Examples of org.elasticsearch.common.blobstore.BlobStoreException


        this.region = region;
        this.serverSideEncryption = serverSideEncryption;

        this.bufferSize = (bufferSize != null) ? bufferSize : MIN_BUFFER_SIZE;
        if (this.bufferSize.getBytes() < MIN_BUFFER_SIZE.getBytes()) {
            throw new BlobStoreException("\"Detected a buffer_size for the S3 storage lower than [" + MIN_BUFFER_SIZE + "]");
        }

        this.numberOfRetries = settings.getAsInt("max_retries", 3);
        if (!client.doesBucketExist(bucket)) {
            if (region != null) {
View Full Code Here


            blobStore.client().getObjectMetadata(blobStore.bucket(), buildKey(blobName));
            return true;
        } catch (AmazonS3Exception e) {
            return false;
        } catch (Throwable e) {
            throw new BlobStoreException("failed to check if blob exists", e);
        }
    }
View Full Code Here

        super(settings);
        this.path = path;
        if (!path.exists()) {
            boolean b = FileSystemUtils.mkdirs(path);
            if (!b) {
                throw new BlobStoreException("Failed to create directory at [" + path + "]");
            }
        }
        if (!path.isDirectory()) {
            throw new BlobStoreException("Path is not a directory at [" + path + "]");
        }
        this.bufferSizeInBytes = (int) settings.getAsBytesSize("buffer_size", new ByteSizeValue(100, ByteSizeUnit.KB)).bytes();
        this.executor = executor;
    }
View Full Code Here

    @Override
    public BlobContainer blobContainer(BlobPath path) {
        try {
            return new URLBlobContainer(this, path, buildPath(path));
        } catch (MalformedURLException ex) {
            throw new BlobStoreException("malformed URL " + path, ex);
        }
    }
View Full Code Here

        super(settings);
        this.path = path;
        if (!path.exists()) {
            boolean b = FileSystemUtils.mkdirs(path);
            if (!b) {
                throw new BlobStoreException("Failed to create directory at [" + path + "]");
            }
        }
        if (!path.isDirectory()) {
            throw new BlobStoreException("Path is not a directory at [" + path + "]");
        }
        this.bufferSizeInBytes = (int) settings.getAsBytesSize("buffer_size", new ByteSizeValue(100, ByteSizeUnit.KB)).bytes();
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.blobstore.BlobStoreException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.