You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by koeninger <gi...@git.apache.org> on 2017/03/13 17:25:40 UTC

[GitHub] spark pull request #16006: [SPARK-18580] [DStreams] [external/kafka-0-10] Us...

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

    https://github.com/apache/spark/pull/16006#discussion_r105720383
  
    --- Diff: external/kafka-0-10/src/main/scala/org/apache/spark/streaming/kafka010/DirectKafkaInputDStream.scala ---
    @@ -143,9 +147,16 @@ private[spark] class DirectKafkaInputDStream[K, V](
     
             lagPerPartition.map { case (tp, lag) =>
               val maxRateLimitPerPartition = ppc.maxRatePerPartition(tp)
    -          val backpressureRate = Math.round(lag / totalLag.toFloat * rate)
    -          tp -> (if (maxRateLimitPerPartition > 0) {
    -            Math.min(backpressureRate, maxRateLimitPerPartition)} else backpressureRate)
    +          val effectiveRate = if (rate >= 0) rate else backpressureInitialRate
    --- End diff --
    
    This can be moved before the map, right?


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

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