squito commented on a change in pull request #24554: [SPARK-27622][Core]
Avoiding the network when block manager fetches disk persisted RDD blocks from
the same host
URL: https://github.com/apache/spark/pull/24554#discussion_r289153514
##########
File path:
core/src/main/scala/org/apache/spark/storage/BlockManagerMasterEndpoint.scala
##########
@@ -522,7 +525,12 @@ class BlockManagerMasterEndpoint(
}
if (locations.nonEmpty && status.isDefined) {
- Some(BlockLocationsAndStatus(locations, status.get))
+ val localDirs = if (status.get.storageLevel.useDisk) {
+ locations.find(_.host ==
requesterHost).map(blockManagerInfo(_).localDirs)
Review comment:
I was confused by your comment at first, but I guess you are saying the
block is cached in memory on the requestorHost, and on disk on another host?
That's a good point, I guess you'd look at more than just `headOption` in the
creation of `val status` above, but to look at the status in locations w/ the
matching host.
----------------------------------------------------------------
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]