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_r272792357
##########
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
+ .createOptional
+
+ private[spark] val CONSUMER_CACHE_INITIAL_CAPACITY =
+ ConfigBuilder("spark.streaming.kafka.consumer.cache.initialCapacity")
+ .intConf
+ .createWithDefault(16)
+
+ private[spark] val CONSUMER_CACHE_MAX_CAPACITY =
+ ConfigBuilder("spark.streaming.kafka.consumer.cache.maxCapacity")
+ .intConf
+ .createWithDefault(64)
+
+ private[spark] val CONSUMER_CACHE_LOAD_FACTOR =
+ ConfigBuilder("spark.streaming.kafka.consumer.cache.loadFactor")
+ .doubleConf
+ .createWithDefault(0.75)
+
+ private[spark] val MAX_RATE_PER_PARTITION =
+ ConfigBuilder("spark.streaming.kafka.maxRatePerPartition")
+ .longConf
+ .createWithDefault(0)
+
+ private[spark] val MIN_RATE_PER_PARTITION =
+ ConfigBuilder("spark.streaming.kafka.minRatePerPartition")
+ .longConf
+ .createWithDefault(1)
+
+ private[spark] val ALLOW_NON_CONSECUTIVE_OFFSETS =
+ ConfigBuilder("spark.streaming.kafka.allowNonConsecutiveOffsets")
+ .booleanConf
+ .createWithDefault(false)
+
+}
+
Review comment:
> Yeah could remove it but it doesn't really matter IMHO. Some files have a
newline at the end some don't.
Spark code check need have a blank line at the end of the file. So I think
there don't have to make a change.
----------------------------------------------------------------
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]