Package org.apache.cassandra.io.util

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


        for (int j = 0; j < 100; j += 2)
        {
            String key = String.valueOf(j);
            DecoratedKey dk = StorageService.getPartitioner().decorateKey(key);
            FileDataInput file = sstable.getFileDataInput(dk, DatabaseDescriptor.getIndexedReadBufferSizeInKB() * 1024);
            DecoratedKey keyInDisk = sstable.getPartitioner().convertFromDiskFormat(file.readUTF());
            assert keyInDisk.equals(dk) : String.format("%s != %s in %s", keyInDisk, dk, file.getPath());
        }

        // check no false positives
        for (int j = 1; j < 110; j += 2)
View Full Code Here


            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

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.