beliefer commented on a change in pull request #24267: 
[MINOR][Streaming][Kafka]Arrange scattered config for kafka 10.
URL: https://github.com/apache/spark/pull/24267#discussion_r272792263
 
 

 ##########
 File path: 
external/kafka-0-10/src/main/scala/org/apache/spark/streaming/kafka010/package.scala
 ##########
 @@ -17,7 +17,52 @@
 
 package org.apache.spark.streaming
 
+import org.apache.spark.internal.config.ConfigBuilder
+
 /**
  * Spark Integration for Kafka 0.10
  */
-package object kafka010 //scalastyle:ignore
+package object kafka010 { //scalastyle:ignore
+
+  private[spark] val CONSUMER_CACHE_ENABLED =
+    ConfigBuilder("spark.streaming.kafka.consumer.cache.enabled")
+      .booleanConf
+      .createWithDefault(true)
+
+  private[spark] val CONSUMER_POLL_MS =
+    ConfigBuilder("spark.streaming.kafka.consumer.poll.ms")
+    .longConf
 
 Review comment:
   > Good question; unfortunately the key has ".ms" so might look funny to 
specify `spark.streaming.kafka.consumer.poll.ms=10s`. I don't mind leaving it 
as-is for now as I think we took the same stance with other similar situations 
(?)
   
   I think both method is good, so I think It is not necessary to use 
`timeConf`.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to