aboutsummaryrefslogtreecommitdiff
path: root/yarn
diff options
context:
space:
mode:
authorSteve Loughran <stevel@hortonworks.com>2015-03-18 09:09:32 -0400
committerSean Owen <sowen@cloudera.com>2015-03-18 09:09:32 -0400
commite09c852d6b83b9b112685d113f2792daec8785a3 (patch)
treeab48ee1763a39bb5efcf394c09a3f45a334cab47 /yarn
parent6205a255aea0652dddadf953771f5405065b5bec (diff)
downloadspark-e09c852d6b83b9b112685d113f2792daec8785a3.tar.gz
spark-e09c852d6b83b9b112685d113f2792daec8785a3.tar.bz2
spark-e09c852d6b83b9b112685d113f2792daec8785a3.zip
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
Diffstat (limited to 'yarn')
-rw-r--r--yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala b/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
index e966bfba7b..056b8c0257 100644
--- a/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
+++ b/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
@@ -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)
}
}
}