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/04/03 10:31:36 UTC

[GitHub] [spark] hehuiyuan commented on a change in pull request #24270: [SPARK-27343][KAFKA][SS]Avoid hardcoded for spark-sql-kafka-0-10

hehuiyuan commented on a change in pull request #24270: [SPARK-27343][KAFKA][SS]Avoid hardcoded for spark-sql-kafka-0-10
URL: https://github.com/apache/spark/pull/24270#discussion_r271677568
 
 

 ##########
 File path: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/CachedKafkaProducer.scala
 ##########
 @@ -37,9 +37,8 @@ private[kafka010] object CachedKafkaProducer extends Logging {
   private val defaultCacheExpireTimeout = TimeUnit.MINUTES.toMillis(10)
 
   private lazy val cacheExpireTimeout: Long =
-    Option(SparkEnv.get).map(_.conf.getTimeAsMs(
-      "spark.kafka.producer.cache.timeout",
-      s"${defaultCacheExpireTimeout}ms")).getOrElse(defaultCacheExpireTimeout)
+    Option(SparkEnv.get).map(_.conf.get(PRODUCER_CACHE_TIMEOUT)
+    ).getOrElse(defaultCacheExpireTimeout)
 
 Review comment:
   ![1](https://user-images.githubusercontent.com/18002496/55472410-9dfbd980-563e-11e9-8342-5cb630c764a8.jpg)
   ?

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