public int compare(String o1, String o2)
{
return dc.compare(partitioner.decorateKey(o1), partitioner.decorateKey(o2));
}
});
DataOutputBuffer buffer = new DataOutputBuffer();
for (String key : orderedKeys)
{
buffer.reset();
ColumnFamily columnFamily = columnFamilies_.get(key);
if (columnFamily != null)
{
/* serialize the cf with column indexes */
ColumnFamily.serializer().serializeWithIndexes(columnFamily, buffer);
/* Now write the key and value to disk */
writer.append(partitioner.decorateKey(key), buffer);
}
}
SSTableReader ssTable = writer.closeAndOpenReader();
cfStore.onMemtableFlush(cLogCtx);
cfStore.storeLocation(ssTable);
buffer.close();
isFlushed_ = true;
logger_.info("Completed flushing " + this);
}