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

    https://github.com/apache/spark/pull/2844#discussion_r19126192
  
    --- Diff: 
core/src/main/scala/org/apache/spark/broadcast/TorrentBroadcast.scala ---
    @@ -62,6 +59,20 @@ private[spark] class TorrentBroadcast[T: ClassTag](
        * blocks from the driver and/or other executors.
        */
       @transient private var _value: T = obj
    +  /** The compression codec to use, or None if compression is disabled */
    +  @transient private var compressionCodec: Option[CompressionCodec] = _
    +  /** Size of each block. Default value is 4MB.  This value is only read 
by the broadcaster. */
    +  @transient private var blockSize: Int = _
    +
    +  private def setConf(conf: SparkConf) {
    +    compressionCodec = if (conf.getBoolean("spark.broadcast.compress", 
true)) {
    +      Some(CompressionCodec.createCodec(conf))
    +    } else {
    +      None
    +    }
    +    blockSize = conf.getInt("spark.broadcast.blockSize", 4096) * 1024
    +  }
    +  setConf(SparkEnv.get.conf)
    --- End diff --
    
    Done.


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