You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by wzhfy <gi...@git.apache.org> on 2017/05/19 09:25:42 UTC

[GitHub] spark pull request #18031: [SPARK-20801] Record accurate size of blocks in M...

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

    https://github.com/apache/spark/pull/18031#discussion_r117440029
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/MapStatus.scala ---
    @@ -193,8 +219,27 @@ private[spark] object HighlyCompressedMapStatus {
         } else {
           0
         }
    +    val threshold1 = Option(SparkEnv.get)
    +      .map(_.conf.get(config.SHUFFLE_ACCURATE_BLOCK_THRESHOLD))
    +      .getOrElse(config.SHUFFLE_ACCURATE_BLOCK_THRESHOLD.defaultValue.get)
    +    val threshold2 = avgSize * Option(SparkEnv.get)
    +      .map(_.conf.get(config.SHUFFLE_ACCURATE_BLOCK_THRESHOLD_BY_TIMES_AVERAGE))
    +      .getOrElse(config.SHUFFLE_ACCURATE_BLOCK_THRESHOLD_BY_TIMES_AVERAGE.defaultValue.get)
    +    val threshold = math.max(threshold1, threshold2)
    --- End diff --
    
    Just for curiosity: is there any reason we compute threshold in this way?


---
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