Examples of blobContainer()


Examples of io.crate.blob.v2.BlobShard.blobContainer()

        // this method only supports local mode, which is ok, since there
        // should be a redirect upfront if data is not local

        BlobShard blobShard = localBlobShard(index, digest);
        long length = blobShard.blobContainer().getFile(digest).length();
        if (length < 1) {
            simpleResponse(HttpResponseStatus.NOT_FOUND, null);
            return;
        }
        HttpResponse response = new DefaultHttpResponse(HTTP_1_1, OK);
View Full Code Here

Examples of io.crate.blob.v2.BlobShard.blobContainer()

            fullContentResponse(request, index, digest);
            return;
        }
        BlobShard blobShard = localBlobShard(index, digest);

        final RandomAccessFile raf = blobShard.blobContainer().getRandomAccessFile(digest);
        long start;
        long end;
        try {
            start = Long.parseLong(matcher.group(1));
            if (start > raf.length()) {
View Full Code Here

Examples of io.crate.blob.v2.BlobShard.blobContainer()

        }
    }

    private void fullContentResponse(HttpRequest request, String index, final String digest) throws  IOException {
        BlobShard blobShard = localBlobShard(index, digest);
        final RandomAccessFile raf = blobShard.blobContainer().getRandomAccessFile(digest);
        HttpResponse response = new DefaultHttpResponse(HTTP_1_1, OK);
        HttpHeaders.setContentLength(response, raf.length());
        setDefaultGetHeaders(response);
        logger.trace("HttpResponse: {}", response);
        ctx.getChannel().write(response);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.