You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "ukby1234 (via GitHub)" <gi...@apache.org> on 2023/09/13 04:04:27 UTC

[GitHub] [spark] ukby1234 commented on a diff in pull request #42296: [SPARK-44635][CORE] Handle shuffle fetch failures in decommissions

ukby1234 commented on code in PR #42296:
URL: https://github.com/apache/spark/pull/42296#discussion_r1323912669


##########
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:
   We can do the following with `Option`: 
   ```
                   val currentAddressOpt = mapOutputTrackerWorker
                     .getMapOutputLocationWithRefresh(shuffleId, mapId, address)
                   currentAddressOpt match {
                     case Some(currentAddress) =>
                       if (currentAddress != address) {
                         logInfo(s"Map status location for block $blockId changed from $address " +
                           s"to $currentAddress")
                         remainingBlocks -= blockId
                         deferredBlocks.getOrElseUpdate(currentAddress, new ArrayBuffer[String]())
                           .append(blockId)
                         enqueueDeferredFetchRequestIfNecessary()
                       } else {
                         results.put(FailureFetchResult(block, infoMap(blockId)._2, address, e))
                       }
                     case None =>
                       results.put(FailureFetchResult(block, infoMap(blockId)._2, address, e))
                   }
   ```
   It is also consistent with other function signatures with `getMapOutputLocation`. 



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