Skip to content
Snippets Groups Projects
Commit e09c852d authored by Steve Loughran's avatar Steve Loughran Committed by Sean Owen
Browse files

SPARK-6389 YARN app diagnostics report doesn't report NPEs

Trivial patch to implicitly call `Exception.toString()` over `Exception.getMessage()` —this defaults to including the exception class & any non-null message; some subclasses include more.

No test.

Author: Steve Loughran <stevel@hortonworks.com>

Closes #5070 from steveloughran/stevel/patches/SPARK-6389-NPE-reporting and squashes the following commits:

8239d85 [Steve Loughran] SPARK-6389 cull use of getMessage over toString in the container launcher
6fbaf6a [Steve Loughran] SPARK-6389 YARN app diagnostics report doesn't report NPEs
parent 6205a255
No related branches found
No related tags found
No related merge requests found
......@@ -151,7 +151,7 @@ private[spark] class ApplicationMaster(
logError("Uncaught exception: ", e)
finish(FinalApplicationStatus.FAILED,
ApplicationMaster.EXIT_UNCAUGHT_EXCEPTION,
"Uncaught exception: " + e.getMessage())
"Uncaught exception: " + e)
}
exitCode
}
......@@ -486,10 +486,10 @@ private[spark] class ApplicationMaster(
case _: InterruptedException =>
// Reporter thread can interrupt to stop user class
case cause: Throwable =>
logError("User class threw exception: " + cause.getMessage, cause)
logError("User class threw exception: " + cause, cause)
finish(FinalApplicationStatus.FAILED,
ApplicationMaster.EXIT_EXCEPTION_USER_CLASS,
"User class threw exception: " + cause.getMessage)
"User class threw exception: " + cause)
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment