use of org.apache.cassandra.dht.LocalPartitioner.LocalToken in project cassandra by apache.
the class SSTableReaderTest method testLoadingSummaryUsesCorrectPartitioner.
@Test
public void testLoadingSummaryUsesCorrectPartitioner() throws Exception {
Keyspace keyspace = Keyspace.open(KEYSPACE1);
ColumnFamilyStore store = keyspace.getColumnFamilyStore("Indexed1");
new RowUpdateBuilder(store.metadata(), System.currentTimeMillis(), "k1").clustering("0").add("birthdate", 1L).build().applyUnsafe();
store.forceBlockingFlush();
for (ColumnFamilyStore indexCfs : store.indexManager.getAllIndexColumnFamilyStores()) {
assert indexCfs.isIndex();
SSTableReader sstable = indexCfs.getLiveSSTables().iterator().next();
assert sstable.first.getToken() instanceof LocalToken;
sstable.saveSummary();
SSTableReader reopened = SSTableReader.open(sstable.descriptor);
assert reopened.first.getToken() instanceof LocalToken;
reopened.selfRef().release();
}
}
Aggregations