Search in sources :

Example 1 with SSTableNamesIterator

use of org.apache.cassandra.db.columniterator.SSTableNamesIterator in project eiger by wlloyd.

the class LegacySSTableTest method testVersion.

public void testVersion(String version) throws Throwable {
    try {
        SSTableReader reader = SSTableReader.open(getDescriptor(version));
        for (String keystring : TEST_DATA) {
            ByteBuffer key = ByteBufferUtil.bytes(keystring);
            // confirm that the bloom filter does not reject any keys/names
            DecoratedKey dk = reader.partitioner.decorateKey(key);
            SSTableNamesIterator iter = new SSTableNamesIterator(reader, dk, FBUtilities.singleton(key));
            assert iter.next().name().equals(key);
        }
    } catch (Throwable e) {
        System.err.println("Failed to read " + version);
        throw e;
    }
}
Also used : DecoratedKey(org.apache.cassandra.db.DecoratedKey) SSTableNamesIterator(org.apache.cassandra.db.columniterator.SSTableNamesIterator) ByteBuffer(java.nio.ByteBuffer)

Aggregations

ByteBuffer (java.nio.ByteBuffer)1 DecoratedKey (org.apache.cassandra.db.DecoratedKey)1 SSTableNamesIterator (org.apache.cassandra.db.columniterator.SSTableNamesIterator)1