Offset — Read Position of Streaming Query¶
Offset
is an abstraction of stream positions.
Note
There are two Offset
abstractions and new streaming data sources should use Data Source v2 API.
Contract¶
JSON Representation¶
String json()
JSON-encoded representation of the offset
Used when:
MicroBatchExecution
stream execution engine is requested to construct the next streaming micro-batch and run a streaming micro-batchOffsetSeq
is requested for the textual representationOffsetSeqLog
is requested to serialize metadata (write metadata in serialized format)ProgressReporter
is requested to record trigger offsetsContinuousExecution
stream execution engine is requested to run a streaming query in continuous mode and commit an epoch
Implementations¶
- ContinuousMemoryStreamOffset
- FileStreamSourceOffset
- KafkaSourceOffset
- LongOffset
- SerializedOffset
- TextSocketOffset