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:
SupportsAdmissionControl
is requested for the default ReadLimitKafkaMicroBatchStream
is requested for the default ReadLimitKafkaSource
is requested for the default ReadLimitAvailableNowDataStreamWrapper
is requested toprepareForTriggerAvailableNow
,getDefaultReadLimit
MicroBatchExecution
is requested for the uniqueSourcesContinuousExecution
is 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:
KafkaMicroBatchStream
is requested for the default read limitKafkaSource
is requested for the default read limit
Creating ReadMaxRows¶
ReadLimit maxRows(
long rows)
maxRows
creates a ReadMaxRows
with the given rows
.
maxRows
is used when:
KafkaMicroBatchStream
is requested for the default ReadLimitKafkaSource
is requested for the default ReadLimitRatePerMicroBatchStream
is 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:
KafkaMicroBatchStream
is requested for the default ReadLimitKafkaSource
is requested for the default ReadLimit
Implementations¶
- CompositeReadLimit
ReadAllAvailable
ReadMaxFiles
- ReadMaxRows
- ReadMinRows
CompositeReadLimit¶
CompositeReadLimit
is a ReadLimit that holds other ReadLimits.
CompositeReadLimit
is created using ReadLimit.compositeLimit utility.
Used when:
KafkaMicroBatchStream
is requested for the latest offsetKafkaSource
is 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:
KafkaMicroBatchStream
is requested for the latestOffsetKafkaSource
is 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:
KafkaMicroBatchStream
is requested for the latestOffsetKafkaSource
is requested for the latestOffset