xuanyuanking commented on a change in pull request #32609:
URL: https://github.com/apache/spark/pull/32609#discussion_r638624224
##########
File path:
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaOffsetReader.scala
##########
@@ -77,6 +77,19 @@ private[kafka010] trait KafkaOffsetReader {
partitionTimestamps: Map[TopicPartition, Long],
failsOnNoMatchingOffset: Boolean): KafkaSourceOffset
+ /**
+ * Resolves the specific offsets based on timestamp per all topic-partitions
being subscribed.
+ * The returned offset for each partition is the earliest offset whose
timestamp is greater
+ * than or equal to the given timestamp in the corresponding partition. If
the matched offset
+ * doesn't exist, depending on `failsOnNoMatchingOffset` parameter, the
offset will be set to
+ * latest or this method throws an error.
+ *
+ * @param timestamp the timestamp.
+ * @param failsOnNoMatchingOffset whether to fail the query when no matched
offset can be found.
+ */
+ def fetchGlobalTimestampBasedOffsets(timestamp: Long,
Review comment:
super nit for the code style, maybe a new line for the params?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]