Class DefaultVisitedDeduplicator

  • All Implemented Interfaces:
    VisitedDeduplicator

    public final class DefaultVisitedDeduplicator
    extends java.lang.Object
    implements VisitedDeduplicator
    Helper to avoid duplicate Nessie commit log scan, considering the effective cutoffTimestamp.

    Assumes that a commit log scan with cut-off timestamp "A" can be aborted, when a commit log scan with cut-off timestamp "B" has already processed the same commit ID AND B <= A.

    Maintains a map of cutoff-timestamp to a set of visited commits. If a given commit has already been visited with a cutoff-timestamp that is equal to or older than the given cutoff-timestamp, live-contents-identification can stop.

    NOTE: the reason that this deduplicator is not wired up to the Nessie GC tool is that the exact heap pressure needs to be thoroughly determined, because a Java OutOfMemory situation must be avoided.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean alreadyVisited​(java.time.Instant cutoffTimestamp, java.lang.String commitId)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultVisitedDeduplicator

        public DefaultVisitedDeduplicator()
    • Method Detail

      • alreadyVisited

        public boolean alreadyVisited​(@Nonnull @Nonnull
                                      java.time.Instant cutoffTimestamp,
                                      @Nonnull @Nonnull
                                      java.lang.String commitId)
        Specified by:
        alreadyVisited in interface VisitedDeduplicator