private static int getSegmentsCellsCount(List<? extends Segment> list) { int res = 0; for (Segment segment : list) { res += segment.getCellsCount(); } return res; }
@Override public void updateStats(Segment replacement) { if(compacted) { if (replacement.getCellsCount() / numCellsInVersionedList < 1.0 - compactionThreshold) { // compaction was a good decision - increase probability compactionProbability *= ADAPTIVE_PROBABILITY_FACTOR; if(compactionProbability > 1.0) { compactionProbability = 1.0; } } else { // compaction was NOT a good decision - decrease probability compactionProbability /= ADAPTIVE_PROBABILITY_FACTOR; } } }
@Override public String toString() { String res = "type=" + this.getClass().getSimpleName() + ", "; res += "empty=" + (isEmpty()? "yes": "no") + ", "; res += "cellCount=" + getCellsCount() + ", "; res += "cellSize=" + getDataSize() + ", "; res += "totalHeapSize=" + getHeapSize() + ", "; res += "min timestamp=" + timeRangeTracker.getMin() + ", "; res += "max timestamp=" + timeRangeTracker.getMax(); return res; }
counter2 += s.getCellsCount(); counter3 += s.getCellsCount(); counter4 += s.getCellsCount(); counter += s.getCellsCount();
counter += s.getCellsCount();
counter += s.getCellsCount(); counter = 0; for ( Segment s : memstore.getSegments()) { counter += s.getCellsCount();
assertEquals(totalHeapSize, ((CompactingMemStore)memstore).heapSize()); for ( Segment s : memstore.getSegments()) { counter += s.getCellsCount();
counter2 += s.getCellsCount(); counter3 += s.getCellsCount(); counter4 += s.getCellsCount(); counter += s.getCellsCount();
counter += s.getCellsCount();
counter += s.getCellsCount(); counter = 0; for ( Segment s : memstore.getSegments()) { counter += s.getCellsCount();
assertEquals(totalHeapSize, ((CompactingMemStore)memstore).heapSize()); for ( Segment s : memstore.getSegments()) { counter += s.getCellsCount();