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 2020/02/24 13:18:20 UTC

[GitHub] [spark] liupc commented on a change in pull request #27604: [SPARK-30849][CORE][SHUFFLE]Fix application failed due to failed to get MapStatuses broadcast block

liupc commented on a change in pull request #27604: [SPARK-30849][CORE][SHUFFLE]Fix application failed due to failed to get MapStatuses broadcast block
URL: https://github.com/apache/spark/pull/27604#discussion_r383258966
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/MapOutputTracker.scala
 ##########
 @@ -824,11 +825,15 @@ private[spark] class MapOutputTrackerWorker(conf: SparkConf) extends MapOutputTr
       endPartition: Int): Iterator[(BlockManagerId, Seq[(BlockId, Long, Int)])] = {
     logDebug(s"Fetching outputs for shuffle $shuffleId, mappers $startMapIndex-$endMapIndex" +
       s"partitions $startPartition-$endPartition")
-    val statuses = getStatuses(shuffleId, conf)
     try {
+      val statuses = getStatuses(shuffleId, conf)
       MapOutputTracker.convertMapStatuses(
         shuffleId, startPartition, endPartition, statuses, startMapIndex, endMapIndex)
     } catch {
+      case e: IOException if
+        Throwables.getCausalChain(e).asScala.exists(_.isInstanceOf[BlockNotFoundException]) =>
+        mapStatuses.clear()
+        throw new MetadataFetchFailedException(shuffleId, -1, Throwables.getStackTraceAsString(e))
 
 Review comment:
   @Ngone51 I'm both fine with add a new type of `FetchFailedException` or just use `MetadataFetchFailedException`, but I think maybe the `MetadataFetchFailedException` is already enough for expressing the lost of the `Mapstatus`(the mapId and reduceId are both set to -1)

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org