Package org.apache.cassandra.db

Examples of org.apache.cassandra.db.FileStruct


        ssTable.close(bf);

        // 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


        // verify
        SSTable.indexMetadataMap_.clear(); // force reloading the index
        List<String> keys = new ArrayList(map.keySet());
        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

Related Classes of org.apache.cassandra.db.FileStruct

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.