Class RangeTombstoneMarker.Merger

  • Enclosing interface:
    RangeTombstoneMarker

    public static class RangeTombstoneMarker.Merger
    extends java.lang.Object
    Utility class to help merging range tombstone markers coming from multiple inputs (UnfilteredRowIterators).

    The assumption that each individual input must validate and that we must preserve in the output is that every open marker has a corresponding close marker with the exact same deletion info, and that there is no other range tombstone marker between those open and close marker (of course, they could be rows in between). In other word, for any UnfilteredRowIterator, you only ever have to remenber the last open marker (if any) to have the full picture of what is deleted by range tombstones at any given point of iterating that iterator.

    Note that this class can merge both forward and reverse iterators. To deal with reverse, we just reverse how we deal with open and close markers (in forward order, we'll get open-close, open-close, ..., while in reverse we'll get close-open, close-open, ...).