Package io.crate.blob

Examples of io.crate.blob.BlobContainer


        }
    }

    @Test
    public void testBlobFound() throws Exception {
        BlobContainer container = new BlobContainer(tmpDir.toFile());
        String digest = "417de3231e23dcd6d224ff60918024bc6c59aa58";

        File blob = new File(container.getVarDirectory().getAbsolutePath() + "/01/" + digest);
        blob.createNewFile();
        long mtime = blob.lastModified();

        BlobDigestExpression digestExpression = new BlobDigestExpression();
        BlobLastModifiedExpression ctimeExpression = new BlobLastModifiedExpression();
View Full Code Here


        String digest = "417de3231e23dcd6d224ff60918024bc6c59aa58";
        UUID transferId = UUID.randomUUID();
        int currentPos = 2;


        BlobContainer container = new BlobContainer(tmpDir.toFile());
        File filePath = new File(container.getTmpDirectory(), String.format("%s.%s", digest, transferId.toString()));
        if (filePath.exists()) {
            filePath.delete();
        }

        DigestBlob digestBlob = DigestBlob.resumeTransfer(
View Full Code Here

    }

    @Test
    public void testResumeDigestBlobAddHeadAfterContent() throws IOException {
        UUID transferId = UUID.randomUUID();
        BlobContainer container = new BlobContainer(tmpDir.toFile());
        DigestBlob digestBlob = DigestBlob.resumeTransfer(
            container, "417de3231e23dcd6d224ff60918024bc6c59aa58", transferId, 2);

        BytesArray contentTail = new BytesArray("CDEFGHIJKLMN".getBytes());
        digestBlob.addContent(contentTail, false);
View Full Code Here

                        IndexShard indexShard) {
        super(shardId, indexSettings);
        this.indexShard = indexShard;
        File blobDir = blobDir(blobEnvironment);
        logger.info("creating BlobContainer at {}", blobDir);
        this.blobContainer = new BlobContainer(blobDir);
    }
View Full Code Here

TOP

Related Classes of io.crate.blob.BlobContainer

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.