Examples of openEarly()


Examples of org.apache.cassandra.io.sstable.format.SSTableWriter.openEarly()

            cf.addColumn(Util.cellname(i), ByteBuffer.allocate(1000), 1);
        File dir = cfs.directories.getDirectoryForNewSSTables();
        SSTableWriter writer = getWriter(cfs, dir);
        for (int i = 0; i < 500; i++)
            writer.append(StorageService.getPartitioner().decorateKey(ByteBufferUtil.bytes(i)), cf);
        SSTableReader s = writer.openEarly(1000);
        assertFileCounts(dir.list(), 2, 3);
        for (int i = 500; i < 1000; i++)
            writer.append(StorageService.getPartitioner().decorateKey(ByteBufferUtil.bytes(i)), cf);
        SSTableReader s2 = writer.openEarly(1000);
        assertTrue(s != s2);
View Full Code Here

Examples of org.apache.cassandra.io.sstable.format.SSTableWriter.openEarly()

            writer.append(StorageService.getPartitioner().decorateKey(ByteBufferUtil.bytes(i)), cf);
        SSTableReader s = writer.openEarly(1000);
        assertFileCounts(dir.list(), 2, 3);
        for (int i = 500; i < 1000; i++)
            writer.append(StorageService.getPartitioner().decorateKey(ByteBufferUtil.bytes(i)), cf);
        SSTableReader s2 = writer.openEarly(1000);
        assertTrue(s != s2);
        assertFileCounts(dir.list(), 2, 3);
        s.markObsolete();
        s.releaseReference();
        Thread.sleep(1000);
View Full Code Here

Examples of org.apache.cassandra.io.sstable.format.SSTableWriter.openEarly()

        File dir = cfs.directories.getDirectoryForNewSSTables();
        SSTableWriter writer = getWriter(cfs, dir);

        for (int i = 0; i < 500; i++)
            writer.append(StorageService.getPartitioner().decorateKey(ByteBufferUtil.bytes(i)), cf);
        SSTableReader s = writer.openEarly(1000);
        //assertFileCounts(dir.list(), 2, 3);
        for (int i = 500; i < 1000; i++)
            writer.append(StorageService.getPartitioner().decorateKey(ByteBufferUtil.bytes(i)), cf);
        writer.closeAndOpenReader();
        s.markObsolete();
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.