@Override public Map<String, Double> getActiveSegmentCompressionRatios() { Map<String, Double> segmentRatios = new TreeMap<>(); for (CommitLogSegment segment : allocator.getActiveSegments()) segmentRatios.put(segment.getName(), 1.0 * segment.onDiskSize() / segment.contentSize()); return segmentRatios; }
@Override public long getActiveContentSize() { long size = 0; for (CommitLogSegment segment : allocator.getActiveSegments()) size += segment.contentSize(); return size; }