// these before adding it to the output list.
if (includeTransformedKey(key)) {
// try to defend against a scan or compaction using all memory in a tablet server
if (appened > maxBufferSize)
throw new BufferOverflowException("Exceeded buffer size of " + maxBufferSize + ", prefixKey: " + prefixKey);
if (getSource().hasTop() && key == getSource().getTopKey())
key = new Key(key);
keys.add(new Pair<Key,Value>(key, new Value(val)));
appened += (key.getSize() + val.getSize() + 128);