cloud-fan commented on a change in pull request #25299: [SPARK-27651][Core] 
Avoid the network when shuffle blocks are fetched from the same host
URL: https://github.com/apache/spark/pull/25299#discussion_r319473468
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/network/BlockDataManager.scala
 ##########
 @@ -22,16 +22,22 @@ import scala.reflect.ClassTag
 import org.apache.spark.TaskContext
 import org.apache.spark.network.buffer.ManagedBuffer
 import org.apache.spark.network.client.StreamCallbackWithID
-import org.apache.spark.storage.{BlockId, StorageLevel}
+import org.apache.spark.storage.{BlockId, ShuffleBlockId, StorageLevel}
 
 private[spark]
 trait BlockDataManager {
 
+  /**
+   * Interface to get host-local shuffle block data. Throws an exception if 
the block cannot be
 
 Review comment:
   The block manager keeps RDD blocks as well, shall we support it? I think 
it's better to have a `def getHostLocalBlockData(blockId: BlockId, dirs: 
Array[String])`, to be consistent with `getLocalBlockData`. We can add an 
assert in `getHostLocalBlockData` to make sure the `blockId` is 
`ShuffleBlockId`, if we don't want to support RDD blocks now.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to