YARN-1438. Ensure container diagnostics includes exception from container launch. Contributed by Steve Loughran.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1548336 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2013-12-06 00:25:02 +00:00
parent 368d9769f4
commit ef1f556cef
2 changed files with 5 additions and 1 deletions

View File

@ -294,6 +294,9 @@ Release 2.3.0 - UNRELEASED
YARN-1407. RM Web UI and REST APIs should uniformly use YARN-1407. RM Web UI and REST APIs should uniformly use
YarnApplicationState (Sandy Ryza) YarnApplicationState (Sandy Ryza)
YARN-1438. Ensure container diagnostics includes exception from container
launch. (stevel via acmurthy)
Release 2.2.0 - 2013-10-13 Release 2.2.0 - 2013-10-13
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -213,7 +213,8 @@ public int launchContainer(Container container,
LOG.warn("Exception from container-launch with container ID: " LOG.warn("Exception from container-launch with container ID: "
+ containerId + " and exit code: " + exitCode , e); + containerId + " and exit code: " + exitCode , e);
logOutput(shExec.getOutput()); logOutput(shExec.getOutput());
String diagnostics = "Exception from container-launch: \n" String diagnostics = "Exception from container-launch: "
+ e + "\n"
+ StringUtils.stringifyException(e) + "\n" + shExec.getOutput(); + StringUtils.stringifyException(e) + "\n" + shExec.getOutput();
container.handle(new ContainerDiagnosticsUpdateEvent(containerId, container.handle(new ContainerDiagnosticsUpdateEvent(containerId,
diagnostics)); diagnostics));