Skip to content

SupportsAdmissionControl

SupportsAdmissionControl is an extension of the SparkDataStream abstraction for data streams to control the rate of data ingested (read) in Micro-Batch Stream Processing.

Contract

Default Read Limit

ReadLimit getDefaultReadLimit()

Note

MicroBatchExecution stream execution engine uses getDefaultReadLimit for SparkDataStreams in streaming queries with the following Triggers:

Default ReadLimit of this SparkDataStream

Default: ReadAllAvailable (and is expected to be overriden by the implementations, if needed)

See:

Used when:

Latest Offset per ReadLimit

Offset latestOffset(
  Offset startOffset,
  ReadLimit limit)

The most recent Offset available given a ReadLimit. null to "announce" no data to process.

See KafkaMicroBatchStream

MicroBatchExecution and latestOffset Phase

MicroBatchExecution stream execution engine uses latestOffset execution phase to track the duration to request a SparkDataStream (indirectly via AvailableNowDataStreamWrapper) or SupportsAdmissionControl for latestOffset and reportLatestOffset

Used when:

Latest Offset Available

Offset reportLatestOffset()

The most recent Offset available (regardless of ReadLimit)

Default: null (no offset to process)

MicroBatchExecution and latestOffset Phase

MicroBatchExecution stream execution engine uses latestOffset execution phase to track the duration to request a SparkDataStream (indirectly via AvailableNowDataStreamWrapper) or SupportsAdmissionControl for latestOffset and reportLatestOffset

Used when:

Implementations