apache_beam.io.range_trackers module
iobase.RangeTracker implementations provided with Apache Beam.
- class apache_beam.io.range_trackers.OffsetRangeTracker(start, end)[source]
Bases:
RangeTrackerA ‘RangeTracker’ for non-negative positions of type ‘long’.
- OFFSET_INFINITY = inf
- property last_record_start
- property last_attempted_record_start
Return current value of last_attempted_record_start.
last_attempted_record_start records a valid position that tried to be claimed by calling try_claim(). This value is only updated by try_claim() no matter try_claim() returns True or False.
- class apache_beam.io.range_trackers.LexicographicKeyRangeTracker(start_position=None, stop_position=None)[source]
Bases:
OrderedPositionRangeTrackerA range tracker that tracks progress through a lexicographically ordered keyspace of strings.
- class apache_beam.io.range_trackers.OrderedPositionRangeTracker(start_position=None, stop_position=None)[source]
Bases:
RangeTrackerAn abstract base class for range trackers whose positions are comparable.
Subclasses only need to implement the mapping from position ranges to and from the closed interval [0, 1].
- UNSTARTED = <object object>
- class apache_beam.io.range_trackers.UnsplittableRangeTracker(range_tracker)[source]
Bases:
RangeTrackerA RangeTracker that always ignores split requests.
This can be used to make a given
RangeTrackerobject unsplittable by ignoring all calls totry_split(). All other calls will be delegated to the givenRangeTracker.Initializes UnsplittableRangeTracker.
- Parameters:
range_tracker (RangeTracker) – a
RangeTrackerto which all method calls except calls totry_split()will be delegated.