ukby1234 commented on code in PR #42296:
URL: https://github.com/apache/spark/pull/42296#discussion_r1292923823
##########
core/src/main/scala/org/apache/spark/MapOutputTracker.scala:
##########
@@ -1288,6 +1288,30 @@ private[spark] class MapOutputTrackerWorker(conf:
SparkConf) extends MapOutputTr
mapSizesByExecutorId.iter
}
+ def getMapOutputLocationWithRefresh(
Review Comment:
Maybe return `Option[BlockManagerId]`?:
```
def getMapOutputLocationWithRefresh(
shuffleId: Int,
mapId: Long,
prevLocation: BlockManagerId):
Option[BlockManagerId] = {
// Try to get the cached location first in case other concurrent tasks
// fetched the fresh location already
getMapOutputLocation(shuffleId, mapId) match {
case Some(location) =>
if (location == prevLocation) {
unregisterShuffle(shuffleId)
getMapOutputLocation(shuffleId, mapId)
} else {
Some(location)
}
case _ =>
None
}
}
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]