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 2019/05/20 08:55:17 UTC

[GitHub] [spark] HeartSaVioR commented on a change in pull request #24613: [SPARK-27549][SS] Add support for committing kafka offsets per batch for supporting external tooling

HeartSaVioR 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_r285485104
 
 

 ##########
 File path: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaOffsetReader.scala
 ##########
 @@ -110,6 +110,34 @@ private[kafka010] class KafkaOffsetReader(
     kafkaReaderThread.shutdown()
   }
 
+  /**
+   * Commits offsets to the consumer_offsets topic
+   * for the driver consumer.
+  */
+  def commitOffsetsAsync(
+      partitionToOffsets: Map[TopicPartition, Long],
+      s: KafkaCommitsSource)
+    : Unit = {
+    if (_consumer != null) runUninterruptibly {
+     val commitCallback = new OffsetCommitCallback() {
+        override def onComplete(
+            offsets: ju.Map[TopicPartition,
+            OffsetAndMetadata], exception: Exception)
+        : Unit = {
 
 Review comment:
   possibly nit - append this to above line unless it exceeds 100 chars

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org