ReadLimit¶
ReadLimit is an abstraction of limits on how many records to read from a MicroBatchStream that SupportsAdmissionControl.
ReadLimit is used by stream execution engines when they are requested for unique streaming sources:
Factory Methods (Subset)¶
ReadAllAvailable¶
ReadLimit allAvailable()
allAvailable returns ReadAllAvailable.
allAvailable is used when:
SupportsAdmissionControlis requested for the default ReadLimitKafkaMicroBatchStreamis requested for the default ReadLimitKafkaSourceis requested for the default ReadLimitAvailableNowDataStreamWrapperis requested toprepareForTriggerAvailableNow,getDefaultReadLimitMicroBatchExecutionis requested for the uniqueSourcesContinuousExecutionis requested for the uniqueSources
Creating CompositeReadLimit¶
ReadLimit compositeLimit(
ReadLimit[] readLimits)
compositeLimit creates a CompositeReadLimit with the given ReadLimits.
Note
compositeLimit is used only in Kafka Data Source when minOffsetPerTrigger and maxOffsetsPerTrigger options are specified.
compositeLimit is used when:
KafkaMicroBatchStreamis requested for the default read limitKafkaSourceis requested for the default read limit
Creating ReadMaxRows¶
ReadLimit maxRows(
long rows)
maxRows creates a ReadMaxRows with the given rows.
maxRows is used when:
KafkaMicroBatchStreamis requested for the default ReadLimitKafkaSourceis requested for the default ReadLimitRatePerMicroBatchStreamis requested for the default ReadLimit
Creating ReadMinRows¶
ReadLimit minRows(
long rows,
long maxTriggerDelayMs)
minRows creates a ReadMinRows with the given rows and maxTriggerDelayMs.
minRows is used when:
KafkaMicroBatchStreamis requested for the default ReadLimitKafkaSourceis requested for the default ReadLimit
Implementations¶
- CompositeReadLimit
ReadAllAvailableReadMaxFiles- ReadMaxRows
- ReadMinRows
CompositeReadLimit¶
CompositeReadLimit is a ReadLimit that holds other ReadLimits.
CompositeReadLimit is created using ReadLimit.compositeLimit utility.
Used when:
KafkaMicroBatchStreamis requested for the latest offsetKafkaSourceis requested for the latest offset
ReadMaxRows¶
ReadMaxRows is a ReadLimit that is described by the following:
| Attribute | Description |
|---|---|
rows | Approximate maximum rows to scan (maxRows) |
ReadMaxRows is created using ReadLimit.maxRows utility.
Used when:
KafkaMicroBatchStreamis requested for the latestOffsetKafkaSourceis requested for the latestOffset
ReadMinRows¶
ReadMinRows is a ReadLimit that is described by the following:
| Attribute | Description |
|---|---|
rows | Approximate minimum rows to scan (minRows) |
maxTriggerDelayMs | Approximate maximum trigger delay |
ReadMinRows is created using ReadLimit.minRows utility.
Used when:
KafkaMicroBatchStreamis requested for the latestOffsetKafkaSourceis requested for the latestOffset