viirya commented on a change in pull request #31944:
URL: https://github.com/apache/spark/pull/31944#discussion_r622374321
##########
File path:
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaMicroBatchStream.scala
##########
@@ -133,6 +137,10 @@ private[kafka010] class KafkaMicroBatchStream(
override def toString(): String = s"KafkaV2[$kafkaOffsetReader]"
+ override def metrics(latestOffset: Optional[Offset]): ju.Map[String, String]
= {
+ KafkaMicroBatchStream.metrics(latestOffset, latestPartitionOffsets)
Review comment:
`latestOffset` matches to `latestConsumedOffset` of
`KafkaMicroBatchStream.metrics`. So it looks like the latest consumed offset.
In the doc of `ReportsSourceMetrics`, when I read "Returns the metrics
reported by the streaming source with respect to the latest offset", I thought
the latest offset parameter is latest available offset.
Could you make it clear in the API doc that the passed in is latest consumed
offset?
--
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]