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

    https://github.com/apache/spark/pull/2240#discussion_r17262643
  
    --- Diff: 
core/src/main/scala/org/apache/spark/shuffle/FileShuffleBlockManager.scala ---
    @@ -166,34 +167,30 @@ class FileShuffleBlockManager(conf: SparkConf)
         }
       }
     
    -  /**
    -   * Returns the physical file segment in which the given BlockId is 
located.
    -   */
    -  private def getBlockLocation(id: ShuffleBlockId): FileSegment = {
    +  override def getBytes(blockId: ShuffleBlockId): Option[ByteBuffer] = {
    +    val segment = getBlockData(blockId)
    +    Some(segment.nioByteBuffer())
    +  }
    +
    +  override def getBlockData(blockId: ShuffleBlockId): ManagedBuffer = {
    --- End diff --
    
    Note to reviewer: This is changed to return a ManagedBuffer, which can 
return an input stream directly from the underlying file rather than copying 
the entire underlying content to a bytebuffer and create an input stream from 
that bytebuffer.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to