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

    https://github.com/apache/spark/pull/860#discussion_r13269370
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala 
---
    @@ -1015,8 +1015,26 @@ private[spark] class BlockManager(
           bytes: ByteBuffer,
           serializer: Serializer = defaultSerializer): Iterator[Any] = {
         bytes.rewind()
    -    val stream = wrapForCompression(blockId, new 
ByteBufferInputStream(bytes, true))
    -    serializer.newInstance().deserializeStream(stream).asIterator
    +
    +    def doWork() = {
    +      val stream = wrapForCompression(blockId, new 
ByteBufferInputStream(bytes, true))
    +      serializer.newInstance().deserializeStream(stream).asIterator
    +    }
    +
    +    if (blockId.isShuffle) {
    +      // Reducer may need to read many local shuffle blocks and will wrap 
them into Iterators
    +      // at the beginning. The wrapping will cost some memory(compression 
instance
    --- End diff --
    
    Add space before (


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to