From 2c217482e855cd2ed1c7f86fd3de85e10001ab5d Mon Sep 17 00:00:00 2001 From: Arun Murthy Date: Fri, 6 Dec 2013 00:26:03 +0000 Subject: [PATCH] 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 --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../yarn/server/nodemanager/DefaultContainerExecutor.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 6f62dae71e7..b02e97587fc 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -279,6 +279,9 @@ Release 2.3.0 - UNRELEASED YARN-1407. RM Web UI and REST APIs should uniformly use YarnApplicationState (Sandy Ryza) + YARN-1438. Ensure container diagnostics includes exception from container + launch. (stevel via acmurthy) + Release 2.2.0 - 2013-10-13 INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java index 507f7a04931..9e2e1113aed 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java @@ -213,7 +213,8 @@ public class DefaultContainerExecutor extends ContainerExecutor { LOG.warn("Exception from container-launch with container ID: " + containerId + " and exit code: " + exitCode , e); logOutput(shExec.getOutput()); - String diagnostics = "Exception from container-launch: \n" + String diagnostics = "Exception from container-launch: " + + e + "\n" + StringUtils.stringifyException(e) + "\n" + shExec.getOutput(); container.handle(new ContainerDiagnosticsUpdateEvent(containerId, diagnostics));