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

    https://github.com/apache/spark/pull/3032#discussion_r19718354
  
    --- Diff: 
core/src/main/scala/org/apache/spark/shuffle/hash/BlockStoreShuffleFetcher.scala
 ---
    @@ -52,21 +53,21 @@ 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)
    --- End diff --
    
    I will revert to the Utils.exceptionString() way.
    
    Looks `Utils.exceptionString()` does not handle the nested exceptions like 
this. It would output the outermost exception info. Is it intentional?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to