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

    https://github.com/apache/spark/pull/22223#discussion_r212691622
  
    --- Diff: 
external/kafka-0-10/src/main/scala/org/apache/spark/streaming/kafka010/DirectKafkaInputDStream.scala
 ---
    @@ -141,10 +143,9 @@ private[spark] class DirectKafkaInputDStream[K, V](
               tp -> Math.max(offset - currentOffsets(tp), 0)
             }
             val totalLag = lagPerPartition.values.sum
    -
             lagPerPartition.map { case (tp, lag) =>
               val maxRateLimitPerPartition = ppc.maxRatePerPartition(tp)
    -          val backpressureRate = lag / totalLag.toDouble * rate
    +          var backpressureRate = lag / totalLag.toDouble * rate
    --- End diff --
    
    Why was this changed to a var?


---

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

Reply via email to