Merge -c 1548336 from trunk to branch-2 to fix 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/branches/branch-2@1548337 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2013-12-06 00:26:03 +00:00
parent 2ed6ee6fe0
commit 2c217482e8
2 changed files with 5 additions and 1 deletions

View File

@ -279,6 +279,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));