You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/11/03 02:43:35 UTC
[GitHub] [spark] mridulm commented on a change in pull request #34461: [SPARK-37023][CORE] Avoid fetching merge status when shuffleMergeEnabled is false for a shuffleDependency during retry
mridulm commented on a change in pull request #34461:
URL: https://github.com/apache/spark/pull/34461#discussion_r741582590
##########
File path: core/src/main/scala/org/apache/spark/MapOutputTracker.scala
##########
@@ -1174,14 +1182,43 @@ private[spark] class MapOutputTrackerWorker(conf: SparkConf) extends MapOutputTr
*/
private val fetchingLock = new KeyLock[Int]
+ override def getMapSizesByExecutorId(
+ shuffleId: Int,
+ startMapIndex: Int,
+ endMapIndex: Int,
+ startPartition: Int,
+ endPartition: Int): Iterator[(BlockManagerId, Seq[(BlockId, Long, Int)])] = {
+ val mapSizesByExecutorId = getMapSizesByExecutorIdImpl(
+ shuffleId, startMapIndex, endMapIndex, startPartition, endPartition, useMergeResult = false)
+ assert(mapSizesByExecutorId.enableBatchFetch == true)
+ mapSizesByExecutorId.iter
+ }
+
override def getPushBasedShuffleMapSizesByExecutorId(
shuffleId: Int,
startMapIndex: Int,
endMapIndex: Int,
startPartition: Int,
endPartition: Int): MapSizesByExecutorId = {
+ getMapSizesByExecutorIdImpl(
+ shuffleId, startMapIndex, endMapIndex, startPartition, endPartition, useMergeResult = true)
+ }
+
+ private def getMapSizesByExecutorIdImpl(
+ shuffleId: Int,
+ startMapIndex: Int,
+ endMapIndex: Int,
+ startPartition: Int,
+ endPartition: Int,
+ useMergeResult: Boolean): MapSizesByExecutorId = {
logDebug(s"Fetching outputs for shuffle $shuffleId")
- val (mapOutputStatuses, mergedOutputStatuses) = getStatuses(shuffleId, conf)
+ val (mapOutputStatuses, mergedOutputStatuses) = getStatuses(shuffleId, conf,
+ // EnableBatchFetch can be unexpectedly set to false during stage retry when the
Review comment:
remove `unexpectedly`
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org