@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { super.seek(range, columnFamilies, inclusive); if (!super.hasTop()) { return; } do { topKey = super.getTopKey(); if (!topKey.isDeleted()) { topValue = super.getTopValue(); sum += encoder.decode(super.getTopValue().get()); } super.next(); } while (super.hasTop()); topValue = new Value(encoder.encode(sum)); hasTop = true; }