gaborgsomogyi commented on a change in pull request #24613: [SPARK-27549][SS] 
Add support for committing kafka offsets per batch for supporting external 
tooling
URL: https://github.com/apache/spark/pull/24613#discussion_r285017419
 
 

 ##########
 File path: 
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaMicroBatchStream.scala
 ##########
 @@ -168,7 +174,15 @@ private[kafka010] class KafkaMicroBatchStream(
     KafkaSourceOffset(JsonUtils.partitionOffsets(json))
   }
 
-  override def commit(end: Offset): Unit = {}
+  override def commit(end: Offset): Unit = {
+    if (shouldSetCommitOffsetsOnCheckpoints) {
 
 Review comment:
   I think this whole block should be wrapped with a `try catch log` since this 
is best effort and shouldn't have any effect on the processing (like 
`commitAsync` throws transient exception). With the actual implementation the 
query could stop because this part is not working.

----------------------------------------------------------------
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]

Reply via email to