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:
MicroBatchExecutionstream execution engine is requested to construct the next streaming micro-batch and run a streaming micro-batchOffsetSeqis requested for the textual representationOffsetSeqLogis requested to serialize metadata (write metadata in serialized format)ProgressReporteris requested to record trigger offsetsContinuousExecutionstream execution engine is requested to run a streaming query in continuous mode and commit an epoch
Implementations¶
- ContinuousMemoryStreamOffset
- FileStreamSourceOffset
- KafkaSourceOffset
- LongOffset
- SerializedOffset
- TextSocketOffset