Package org.apache.cassandra.db

Examples of org.apache.cassandra.db.FileStruct.seekTo()


        // verify
        SSTable.indexMetadataMap_.clear(); // force reloading the index
        ssTable = new SSTable(f.getPath() + "-Data.db", new OrderPreservingPartitioner());
        FileStruct fs = new FileStruct(SequenceFile.bufferedReader(ssTable.dataFile_, 128 * 1024), new OrderPreservingPartitioner());
        fs.seekTo(key);
        int size = fs.getBufIn().readInt();
        byte[] bytes2 = new byte[size];
        fs.getBufIn().readFully(bytes2);
        assert Arrays.equals(bytes2, bytes);
    }
View Full Code Here


        Collections.shuffle(keys);
        ssTable = new SSTable(f.getPath() + "-Data.db", new OrderPreservingPartitioner());
        FileStruct fs = new FileStruct(SequenceFile.bufferedReader(ssTable.dataFile_, 128 * 1024), new OrderPreservingPartitioner());
        for (String key : keys)
        {
            fs.seekTo(key);
            int size = fs.getBufIn().readInt();
            byte[] bytes2 = new byte[size];
            fs.getBufIn().readFully(bytes2);
            assert Arrays.equals(bytes2, map.get(key));
        }
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.