You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/01/18 23:21:45 UTC
[GitHub] [spark] alex-balikov commented on a change in pull request #35238: [SPARK-36649][SQL] Support `Trigger.AvailableNow` on Kafka data source
alex-balikov commented on a change in pull request #35238:
URL: https://github.com/apache/spark/pull/35238#discussion_r787222535
##########
File path: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaMicroBatchStream.scala
##########
@@ -57,7 +57,7 @@ private[kafka010] class KafkaMicroBatchStream(
metadataPath: String,
startingOffsets: KafkaOffsetRangeLimit,
failOnDataLoss: Boolean)
- extends SupportsAdmissionControl with ReportsSourceMetrics with MicroBatchStream with Logging {
+ extends SupportsTriggerAvailableNow with ReportsSourceMetrics with MicroBatchStream with Logging {
Review comment:
what about SupportsAdmissionControl - I see other APIs specifying both - https://livegrep.dev.databricks.com/view/databricks/runtime/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSource.scala#L57
even if one extends the other, is it better to list them explicitly?
##########
File path: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaMicroBatchStream.scala
##########
@@ -98,7 +100,7 @@ private[kafka010] class KafkaMicroBatchStream(
} else if (minOffsetPerTrigger.isDefined) {
ReadLimit.minRows(minOffsetPerTrigger.get, maxTriggerDelayMs)
} else {
- maxOffsetsPerTrigger.map(ReadLimit.maxRows).getOrElse(super.getDefaultReadLimit)
+ maxOffsetsPerTrigger.map(ReadLimit.maxRows).getOrElse(ReadLimit.allAvailable())
Review comment:
why this change? Isn't it better to delegate to the parent if you have no opinion - e.g. the parent could use some config default or whatever.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org