apache_beam.io.range_trackers module¶
iobase.RangeTracker implementations provided with Apache Beam.
-
class
apache_beam.io.range_trackers.
OffsetRangeTracker
(start, end)[source]¶ Bases:
apache_beam.io.iobase.RangeTracker
A ‘RangeTracker’ for non-negative positions of type ‘long’.
-
OFFSET_INFINITY
= inf¶
-
last_record_start
¶
-
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.
OrderedPositionRangeTracker
(start_position=None, stop_position=None)[source]¶ Bases:
apache_beam.io.iobase.RangeTracker
An 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:
apache_beam.io.iobase.RangeTracker
A RangeTracker that always ignores split requests.
This can be used to make a given
RangeTracker
object unsplittable by ignoring all calls totry_split()
. All other calls will be delegated to the givenRangeTracker
.Initializes UnsplittableRangeTracker.
Parameters: range_tracker (RangeTracker) – a RangeTracker
to which all method calls except calls totry_split()
will be delegated.
-
class
apache_beam.io.range_trackers.
LexicographicKeyRangeTracker
(start_position=None, stop_position=None)[source]¶ Bases:
apache_beam.io.range_trackers.OrderedPositionRangeTracker
A range tracker that tracks progress through a lexicographically ordered keyspace of strings.