List of usage examples for org.apache.cassandra.io.sstable.format SSTableReader estimatedKeys
public long estimatedKeys()
From source file:com.jeffjirsa.cassandra.db.compaction.SizeTieredCompactionStrategy.java
License:Apache License
/** * Returns the reads per second per key for this sstable, or 0.0 if the sstable has no read meter *///w w w .j av a2 s . c o m private static double hotness(SSTableReader sstr) { // system tables don't have read meters, just use 0.0 for the hotness return sstr.getReadMeter() == null ? 0.0 : sstr.getReadMeter().twoHourRate() / sstr.estimatedKeys(); }
From source file:com.knewton.mapreduce.SSTableRecordReader.java
License:Apache License
private void setTableScanner(SSTableReader tableReader) { Preconditions.checkNotNull(tableReader, "Table reader not set"); this.tableScanner = tableReader.getScanner(); this.estimatedKeys = tableReader.estimatedKeys(); }