Github user HeartSaVioR commented on the issue:

    https://github.com/apache/spark/pull/22138
  
    > just wondering why org.apache.spark.sql.kafka010.CachedKafkaProducer uses 
com.google.common.cache.LoadingCache?
    
    Because KafkaProducer is thread-safe unless it enables transaction, hence 
encouraged for multiple tasks to use concurrently. For consumer it is not 
thread-safe so we guarded with custom logic, and this patch proposes to guard 
with Apache Commons Pool.


---

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

Reply via email to