public long[] getValue() { return combineHistograms(cfs.getSSTables(SSTableSet.CANONICAL), new GetHistogram() { public EstimatedHistogram getHistogram(SSTableReader reader) { return reader.getEstimatedPartitionSize(); } }); } });
public Double getValue() { return computeCompressionRatio(cfs.getSSTables(SSTableSet.CANONICAL)); } }, new Gauge<Double>() // global gauge
public long[] getValue() { return combineHistograms(cfs.getSSTables(SSTableSet.CANONICAL), new GetHistogram() { public EstimatedHistogram getHistogram(SSTableReader reader) { return reader.getEstimatedColumnCount(); } }); } });
public long estimateKeys() { long n = 0; for (SSTableReader sstable : getSSTables(SSTableSet.CANONICAL)) n += sstable.estimatedKeys(); return n; }
private SSTableReader lookupSSTable(final ColumnFamilyStore cfs, Descriptor descriptor) { for (SSTableReader sstable : cfs.getSSTables(SSTableSet.CANONICAL)) { if (sstable.descriptor.equals(descriptor)) return sstable; } return null; }
private SSTableReader lookupSSTable(final ColumnFamilyStore cfs, Descriptor descriptor) { for (SSTableReader sstable : cfs.getSSTables(SSTableSet.CANONICAL)) { if (sstable.descriptor.equals(descriptor)) return sstable; } return null; }
public Long getValue() { long total = 0; for (SSTableReader sst : cfs.getSSTables(SSTableSet.CANONICAL)) total += sst.getBloomFilterSerializedSize(); return total; } });
public Long getValue() { long total = 0; for (SSTableReader sst : cfs.getSSTables(SSTableSet.LIVE)) total += sst.getBloomFilterOffHeapSize(); return total; } });
protected double getDenominator() { long requests = 0L; for (SSTableReader sstable : cfs.getSSTables(SSTableSet.LIVE)) requests += sstable.getKeyCacheRequest(); return Math.max(requests, 1); // to avoid NaN. } });
protected double getDenominator() { long requests = 0L; for (SSTableReader sstable : cfs.getSSTables(SSTableSet.LIVE)) requests += sstable.getKeyCacheRequest(); return Math.max(requests, 1); // to avoid NaN. } });
public Long getValue() { long count = 0L; for (SSTableReader sstable : cfs.getSSTables(SSTableSet.LIVE)) count += sstable.getRecentBloomFilterFalsePositiveCount(); return count; } });
public long estimateKeys() { long n = 0; for (SSTableReader sstable : getSSTables(SSTableSet.CANONICAL)) n += sstable.estimatedKeys(); return n; }
protected double getNumerator() { long hits = 0L; for (SSTableReader sstable : cfs.getSSTables(SSTableSet.LIVE)) hits += sstable.getKeyCacheHit(); return hits; }
public double getDroppableTombstoneRatio() { double allDroppable = 0; long allColumns = 0; int localTime = (int)(System.currentTimeMillis()/1000); for (SSTableReader sstable : getSSTables(SSTableSet.CANONICAL)) { allDroppable += sstable.getDroppableTombstonesBefore(localTime - sstable.metadata.params.gcGraceSeconds); allColumns += sstable.getEstimatedColumnCount().mean() * sstable.getEstimatedColumnCount().count(); } return allColumns > 0 ? allDroppable / allColumns : 0; }
public Long getValue() { long min = 0; for (SSTableReader sstable : cfs.getSSTables(SSTableSet.CANONICAL)) { if (min == 0 || sstable.getEstimatedPartitionSize().min() < min) min = sstable.getEstimatedPartitionSize().min(); } return min; } }, new Gauge<Long>() // global gauge
public Long getValue() { long max = 0; for (SSTableReader sstable : cfs.getSSTables(SSTableSet.CANONICAL)) { if (sstable.getEstimatedPartitionSize().max() > max) max = sstable.getEstimatedPartitionSize().max(); } return max; } }, new Gauge<Long>() // global gauge
public int getMeanColumns() { long sum = 0; long count = 0; for (SSTableReader sstable : getSSTables(SSTableSet.CANONICAL)) { long n = sstable.getEstimatedColumnCount().count(); sum += sstable.getEstimatedColumnCount().mean() * n; count += n; } return count > 0 ? (int) (sum / count) : 0; }
public double getMeanPartitionSize() { long sum = 0; long count = 0; for (SSTableReader sstable : getSSTables(SSTableSet.CANONICAL)) { long n = sstable.getEstimatedPartitionSize().count(); sum += sstable.getEstimatedPartitionSize().mean() * n; count += n; } return count > 0 ? sum * 1.0 / count : 0; }
public Long getValue() { long memtablePartitions = 0; for (Memtable memtable : cfs.getTracker().getView().getAllMemtables()) memtablePartitions += memtable.partitionCount(); return SSTableReader.getApproximateKeyCount(cfs.getSSTables(SSTableSet.CANONICAL)) + memtablePartitions; } });
public Long getValue() { long memtablePartitions = 0; for (Memtable memtable : cfs.getTracker().getView().getAllMemtables()) memtablePartitions += memtable.partitionCount(); return SSTableReader.getApproximateKeyCount(cfs.getSSTables(SSTableSet.CANONICAL)) + memtablePartitions; } });