brkyvz commented on a change in pull request #27380: [SPARK-30669][SS]
Introduce AdmissionControl APIs for StructuredStreaming
URL: https://github.com/apache/spark/pull/27380#discussion_r373271798
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/MicroBatchExecution.scala
##########
@@ -122,7 +122,18 @@ class MicroBatchExecution(
// v2 source
case r: StreamingDataSourceV2Relation => r.stream
}
- uniqueSources = sources.distinct
+ uniqueSources = sources.distinct.map {
+ case source: SupportsAdmissionControl =>
+ val limit = source.getDefaultReadLimit
+ if (trigger == OneTimeTrigger && limit != ReadLimit.allAvailable()) {
+ logWarning(s"The read limit $limit for $source is ignored when
Trigger.Once() is used.")
Review comment:
Triggers are a property of the system, not the query, so I don't think it
fits into analysis
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]