Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3032#discussion_r19709873
  
    --- Diff: 
core/src/main/scala/org/apache/spark/shuffle/hash/BlockStoreShuffleFetcher.scala
 ---
    @@ -52,18 +53,18 @@ private[hash] object BlockStoreShuffleFetcher extends 
Logging {
             (address, splits.map(s => (ShuffleBlockId(shuffleId, s._1, 
reduceId), s._2)))
         }
     
    -    def unpackBlock(blockPair: (BlockId, Option[Iterator[Any]])) : 
Iterator[T] = {
    +    def unpackBlock(blockPair: (BlockId, Try[Iterator[Any]])) : 
Iterator[T] = {
           val blockId = blockPair._1
           val blockOption = blockPair._2
           blockOption match {
    -        case Some(block) => {
    +        case Success(block) => {
               block.asInstanceOf[Iterator[T]]
             }
    -        case None => {
    +        case Failure(e) => {
               blockId match {
                 case ShuffleBlockId(shufId, mapId, _) =>
                   val address = statuses(mapId.toInt)._1
    -              throw new FetchFailedException(address, shufId.toInt, 
mapId.toInt, reduceId)
    +              throw new FetchFailedException(address, shufId.toInt, 
mapId.toInt, reduceId, e)
                 case _ =>
                   throw new SparkException(
                     "Failed to get block " + blockId + ", which is not a 
shuffle block")
    --- End diff --
    
    Oh, sorry, I see. Will update it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to