Github user oliviertoupin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18672#discussion_r130169031
  
    --- Diff: 
external/kafka-0-10/src/main/scala/org/apache/spark/streaming/kafka010/DirectKafkaInputDStream.scala
 ---
    @@ -130,8 +130,15 @@ private[spark] class DirectKafkaInputDStream[K, V](
         offsets: Map[TopicPartition, Long]): Option[Map[TopicPartition, Long]] 
= {
         val estimatedRateLimit = rateController.map(_.getLatestRate())
     
    +    // TODO: Fix in rate controller (need SparkConf or initial rate member 
value)
    +    // Fix: Rate controller first value is -1, if -1 return use the 
default rate
    +    val fixedEstimatedRateLimit = estimatedRateLimit match {
    --- End diff --
    
    Not so much of a hack, but limit reusability. The best place would be 
directly in the RateEstimator, but we don't have access to the 
"spark.streaming.backpressure.initialRate".


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to