Package org.apache.cassandra.io.util

Examples of org.apache.cassandra.io.util.BufferedRandomAccessFile.readUTF()


            indexFile.seek(nextIndexPosition);
            String nextKey = indexFile.readUTF();

            BufferedRandomAccessFile file = new BufferedRandomAccessFile(sstable.getFilename(), "r");
            file.seek(info.position + info.size);
            assertEquals(nextKey, file.readUTF());
        }
    }
}
View Full Code Here


    private void verifySingle(SSTableReader sstable, byte[] bytes, String key) throws IOException
    {
        BufferedRandomAccessFile file = new BufferedRandomAccessFile(sstable.path, "r");
        file.seek(sstable.getPosition(sstable.partitioner.decorateKey(key)).position);
        assert key.equals(file.readUTF());
        int size = file.readInt();
        byte[] bytes2 = new byte[size];
        file.readFully(bytes2);
        assert Arrays.equals(bytes2, bytes);
    }
View Full Code Here

        SSTableReader sstable = cfStore.getSSTables().iterator().next();
        DecoratedKey decKey = sstable.getPartitioner().decorateKey(key);
        SSTable.PositionSize info = sstable.getPosition(decKey);
        BufferedRandomAccessFile file = new BufferedRandomAccessFile(sstable.getFilename(), "r");
        file.seek(info.position);
        assert file.readUTF().equals(key);
        file.readInt();
        IndexHelper.skipBloomFilter(file);
        ArrayList<IndexHelper.IndexInfo> indexes = IndexHelper.deserializeIndex(file);
        assert indexes.size() > 2;
        validateSliceLarge(cfStore);
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.