get(key: BaseStreamingSource): Option[Offset]
StreamProgress — Collection of Offsets per Streaming Source
StreamProgress
is a collection of Offsets per streaming source.
StreamProgress
is created when:
-
StreamExecution
is created (and creates committed and available offsets) -
OffsetSeq
is requested to convert to StreamProgress
StreamProgress
is an extension of Scala’s scala.collection.immutable.Map with streaming sources as keys and their Offsets as values.
Creating StreamProgress Instance
StreamProgress
takes the following to be created:
-
Optional collection of offsets per streaming source (
Map[BaseStreamingSource, Offset]
) (default: empty)
Looking Up Offset by Streaming Source — get
Method
Note
|
get is part of the Scala’s scala.collection.MapLike to…FIXME.
|
get
simply looks up an Offsets for the given BaseStreamingSource in the baseMap.
++
Method
++(
updates: GenTraversableOnce[(BaseStreamingSource, Offset)]): StreamProgress
++
simply creates a new StreamProgress with the baseMap and the given updates.
Note
|
++ is used exclusively when OffsetSeq is requested to convert to StreamProgress.
|
Converting to OffsetSeq — toOffsetSeq
Method
toOffsetSeq(
sources: Seq[BaseStreamingSource],
metadata: OffsetSeqMetadata): OffsetSeq
toOffsetSeq
creates a OffsetSeq with offsets that are looked up for every BaseStreamingSource.
Note
|
|