Skip to content

Commit

Permalink
[SPARK-23296][YARN] Include stacktrace in YARN-app diagnostic
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?

Include stacktrace in the diagnostics message upon abnormal unregister from RM

## How was this patch tested?
Tested with a failing job, and confirmed a stacktrace in the client output and YARN webUI.

Author: Gera Shegalov <[email protected]>

Closes #20470 from gerashegalov/gera/stacktrace-diagnostics.

(cherry picked from commit 032c11b)
Signed-off-by: Marcelo Vanzin <[email protected]>
  • Loading branch information
gerashegalov authored and Marcelo Vanzin committed Feb 1, 2018
1 parent 07a8f4d commit ab23785
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import scala.util.control.NonFatal

import org.apache.hadoop.fs.{FileSystem, Path}
import org.apache.hadoop.security.UserGroupInformation
import org.apache.hadoop.util.StringUtils
import org.apache.hadoop.yarn.api._
import org.apache.hadoop.yarn.api.records._
import org.apache.hadoop.yarn.conf.YarnConfiguration
Expand Down Expand Up @@ -718,7 +719,7 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments) extends
logError("User class threw exception: " + cause, cause)
finish(FinalApplicationStatus.FAILED,
ApplicationMaster.EXIT_EXCEPTION_USER_CLASS,
"User class threw exception: " + cause)
"User class threw exception: " + StringUtils.stringifyException(cause))
}
sparkContextPromise.tryFailure(e.getCause())
} finally {
Expand Down

0 comments on commit ab23785

Please sign in to comment.