spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ScrapCodes <...@git.apache.org>
Subject [GitHub] spark pull request #19096: [SPARK-21869][SS] A cached Kafka producer should ...
Date Wed, 17 Jan 2018 11:27:09 GMT
Github user ScrapCodes commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19096#discussion_r162022825
  
    --- Diff: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaContinuousWriter.scala
---
    @@ -112,8 +112,8 @@ class KafkaContinuousDataWriter(
         checkForErrors()
         if (producer != null) {
           producer.flush()
    +      producer.inUseCount.decrementAndGet()
           checkForErrors()
    -      CachedKafkaProducer.close(new java.util.HashMap[String, Object](producerParams.asJava))
    --- End diff --
    
    Since a producer is shared across threads, we maintain inuse counts and close them separately.


---

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


Mime
View raw message