Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
petermaxlee committed Jun 30, 2016
1 parent 45f5003 commit 050e524
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ private[spark] class Executor(

// Don't forcibly exit unless the exception was inherently fatal, to avoid
// stopping other tasks unnecessarily.
if (Utils.isFatalError(t) && !Utils.isLinkageError(t)) {
if (Utils.isFatalError(t)) {
SparkUncaughtExceptionHandler.uncaughtException(t)
}

Expand Down
12 changes: 5 additions & 7 deletions core/src/main/scala/org/apache/spark/util/Utils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1865,19 +1865,17 @@ private[spark] object Utils extends Logging {
/** Returns true if the given exception was fatal. See docs for scala.util.control.NonFatal. */
def isFatalError(e: Throwable): Boolean = {
e match {
case NonFatal(_) | _: InterruptedException | _: NotImplementedError | _: ControlThrowable =>
case NonFatal(_) |
_: InterruptedException |
_: NotImplementedError |
_: ControlThrowable |
_: LinkageError =>
false
case _ =>
true
}
}

/** Returns true if the given exception is a linkage error. */
def isLinkageError(e: Throwable): Boolean = e match {
case _: java.lang.LinkageError => true
case _ => false
}

/**
* Return a well-formed URI for the file described by a user input string.
*
Expand Down

0 comments on commit 050e524

Please sign in to comment.