Class DetectNewPartitionsRangeTracker

  • All Implemented Interfaces:
    org.apache.beam.sdk.transforms.splittabledofn.RestrictionTracker.HasProgress

    public class DetectNewPartitionsRangeTracker
    extends TimestampRangeTracker
    This restriction tracker delegates most of its behavior to an internal TimestampRangeTracker. It has a different logic for tryClaim method. It ignores claims for the same timestamp multiple times.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.beam.sdk.transforms.splittabledofn.RestrictionTracker

        org.apache.beam.sdk.transforms.splittabledofn.RestrictionTracker.HasProgress, org.apache.beam.sdk.transforms.splittabledofn.RestrictionTracker.IsBounded, org.apache.beam.sdk.transforms.splittabledofn.RestrictionTracker.Progress, org.apache.beam.sdk.transforms.splittabledofn.RestrictionTracker.TruncateResult<RestrictionT extends java.lang.Object>
    • Constructor Detail

      • DetectNewPartitionsRangeTracker

        public DetectNewPartitionsRangeTracker​(TimestampRange range)
    • Method Detail

      • tryClaim

        public boolean tryClaim​(com.google.cloud.Timestamp position)
        Attempts to claim the given position.

        Must be equal or larger than the last successfully claimed position.

        Overrides:
        tryClaim in class TimestampRangeTracker
        Returns:
        true if the position was successfully claimed, false if it is outside the current TimestampRange of this tracker (in that case this operation is a no-op).