hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vvasu...@apache.org
Subject [2/2] hadoop git commit: YARN-4252. Log container-executor invocation details when exit code is non-zero. Contributed by Sidharta Seethana.
Date Wed, 14 Oct 2015 09:49:59 GMT
YARN-4252. Log container-executor invocation details when exit code is non-zero. Contributed
by Sidharta Seethana.

(cherry picked from commit fb9c1519b30cf8113cf9b8deed9b9901db5e9693)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/0aeedfd5
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/0aeedfd5
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/0aeedfd5

Branch: refs/heads/branch-2
Commit: 0aeedfd5723fab393ef7833bb6fabbdb3d22609f
Parents: a9b03b5
Author: Varun Vasudev <vvasudev@apache.org>
Authored: Wed Oct 14 15:18:08 2015 +0530
Committer: Varun Vasudev <vvasudev@apache.org>
Committed: Wed Oct 14 15:19:19 2015 +0530

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                          |  3 +++
 .../linux/privileged/PrivilegedOperationExecutor.java    | 11 ++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/0aeedfd5/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index c408962..df4b7fe 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -449,6 +449,9 @@ Release 2.8.0 - UNRELEASED
     YARN-3943. Use separate threshold configurations for disk-full detection
     and disk-not-full detection. (Zhihai Xu via jlowe)
 
+    YARN-4252. Log container-executor invocation details when exit code is non-zero.
+    (Sidharta Seethana via vvasudev)
+
   OPTIMIZATIONS
 
     YARN-3339. TestDockerContainerExecutor should pull a single image and not

http://git-wip-us.apache.org/repos/asf/hadoop/blob/0aeedfd5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/privileged/PrivilegedOperationExecutor.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/privileged/PrivilegedOperationExecutor.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/privileged/PrivilegedOperationExecutor.java
index 1d71938..4b1bb9f 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/privileged/PrivilegedOperationExecutor.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/privileged/PrivilegedOperationExecutor.java
@@ -155,12 +155,17 @@ public class PrivilegedOperationExecutor {
         LOG.debug(exec.getOutput());
       }
     } catch (ExitCodeException e) {
-      String logLine = new StringBuffer("Shell execution returned exit code: ")
+      StringBuilder logBuilder = new StringBuilder("Shell execution returned "
+          + "exit code: ")
           .append(exec.getExitCode())
           .append(". Privileged Execution Operation Output: ")
-          .append(System.lineSeparator()).append(exec.getOutput()).toString();
+          .append(System.lineSeparator()).append(exec.getOutput());
 
-      LOG.warn(logLine);
+      logBuilder.append("Full command array for failed execution: ")
+          .append(System.lineSeparator());
+      logBuilder.append(Arrays.toString(fullCommandArray));
+
+      LOG.warn(logBuilder.toString());
 
       //stderr from shell executor seems to be stuffed into the exception
       //'message' - so, we have to extract it and set it as the error out


Mime
View raw message