Github user brkyvz commented on a diff in the pull request:
https://github.com/apache/spark/pull/17308#discussion_r118186083
--- Diff:
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/CachedKafkaProducer.scala
---
@@ -36,7 +36,7 @@ private[kafka010] object CachedKafkaProducer extends
Logging {
private type Producer = KafkaProducer[Array[Byte], Array[Byte]]
private val cacheExpireTimeout: Long =
- System.getProperty("spark.kafka.guava.cache.timeout", "10").toLong
+ System.getProperty("spark.kafka.guava.cache.timeout.minutes",
"10").toLong
--- End diff --
don't we need to get this from `SparkEnv` by the way? I don't know if the
properties get populated properly.
Also, adding `minutes` to the conf makes it kinda long right? I think we
can also replace `guava` with `producer`.
I think it may also be better to use
[this](https://github.com/apache/spark/blob/master/common/network-common/src/main/java/org/apache/spark/network/util/JavaUtils.java#L213)
so that we get rid of `minutes` and users can actually provide arbitrary
durations (hours if they want). I think that's what we generally use for
`duration` type confs.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]