in modules/accumulo/src/main/java/org/apache/fluo/accumulo/iterators/NotificationIterator.java [98:130]
private void consumeDeletes(PushbackIterator source) throws IOException {
while (source.hasTop() && isNtfy(source.getTopKey()) && isDelete(source.getTopKey())) {
Key keyCopy = new Key(source.getTopKey());
if (scanOrFullMajc) {
// consume everything w/ the same row col
source.next();
skipRowCol(source, keyCopy);
} else {
// need to make a decision about propagating delete... IF the pattern of notifications and
// deletes seems orderly AND it does not end with a delete THEN
// do not propagate delete
Value valCopy = new Value(source.getTopValue());
boolean lastKeyWasDelete = true;
boolean isOrderly = true; // used to check that deletes and notifications alternate
source.next();
while (source.hasTop()
&& source.getTopKey().equals(keyCopy, PartialKey.ROW_COLFAM_COLQUAL_COLVIS)) {
isOrderly &= isDelete(source.getTopKey()) ^ lastKeyWasDelete;
lastKeyWasDelete = isDelete(source.getTopKey());
source.next();
}
if (!isOrderly || lastKeyWasDelete) {
// dropping this delete on a partial compaction does not look promising, so propagate the
// delete marker
source.pushback(keyCopy, valCopy);
break;
}
}
}
}