Github user koeninger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4805#discussion_r25990774
  
    --- Diff: 
external/kafka/src/main/scala/org/apache/spark/streaming/kafka/ReliableKafkaReceiver.scala
 ---
    @@ -239,21 +239,7 @@ class ReliableKafkaReceiver[
           return
         }
     
    -    for ((topicAndPart, offset) <- offsetMap) {
    -      try {
    -        val topicDirs = new ZKGroupTopicDirs(groupId, topicAndPart.topic)
    -        val zkPath = 
s"${topicDirs.consumerOffsetDir}/${topicAndPart.partition}"
    -
    -        ZkUtils.updatePersistentPath(zkClient, zkPath, offset.toString)
    -      } catch {
    -        case e: Exception =>
    -          logWarning(s"Exception during commit offset $offset for topic" +
    -            s"${topicAndPart.topic}, partition ${topicAndPart.partition}", 
e)
    -      }
    -
    -      logInfo(s"Committed offset $offset for topic ${topicAndPart.topic}, 
" +
    -        s"partition ${topicAndPart.partition}")
    -    }
    +    SparkKafkaUtils.commitOffset(zkClient, groupId, offsetMap)
    --- End diff --
    
    Why introduce a separate SparkKafkaUtils object, and how is it different 
from KafkaUtils?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to