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

    https://github.com/apache/spark/pull/640#discussion_r12389180
  
    --- Diff: core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala 
---
    @@ -210,10 +126,15 @@ private[spark] class PythonRDD[T: ClassTag](
                   Array.empty[Byte]
               }
             } catch {
    -          case e: Exception if readerException != null =>
    +
    +          case e: Exception if context.interrupted =>
    +            logDebug("Exception thrown after task interruption", e)
    +            throw new TaskKilledException
    +
    +          case e: Exception if writerThread.exception.isDefined =>
                 logError("Python worker exited unexpectedly (crashed)", e)
    -            logError("Python crash may have been caused by prior 
exception:", readerException)
    -            throw readerException
    +            logError("This may have been caused by a prior exception:", 
writerThread.exception.get)
    +            throw writerThread.exception.get
     
               case eof: EOFException =>
                 throw new SparkException("Python worker exited unexpectedly 
(crashed)", eof)
    --- End diff --
    
    I think the intention here was to only handle EOFs because EOFs are 
considered "expected exceptions", whereas other IOExceptions are "unexpected" 
and therefore just propagated up.


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

Reply via email to