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

    https://github.com/apache/spark/pull/16639#discussion_r103505374
  
    --- Diff: 
core/src/main/scala/org/apache/spark/shuffle/FetchFailedException.scala ---
    @@ -45,6 +50,12 @@ private[spark] class FetchFailedException(
         this(bmAddress, shuffleId, mapId, reduceId, cause.getMessage, cause)
       }
     
    +  // SPARK-19276. We set the fetch failure in the task context, so that 
even if there is user-code
    +  // which intercepts this exception (possibly wrapping it), the Executor 
can still tell there was
    +  // a fetch failure, and send the correct error msg back to the driver.  
The TaskContext won't be
    +  // defined if this is run on the driver (just in test cases) -- we can 
safely ignore then.
    --- End diff --
    
    sorry, I've reworded this.  The issue is that we have test cases where the 
TaskContext isn't defined, and so we'd hit an NPE without the `Option` wrapper. 
 But in general, the `TaskContext` should always be defined anytime we'd create 
a `FetchFailure`.
    
    The alternative would be to track down the test cases w/out a 
`TaskContext`, and add one back.


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