hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jl...@apache.org
Subject git commit: YARN-2377. Localization exception stack traces are not passed as diagnostic info. Contributed by Gera Shegalov (cherry picked from commit a56ea0100215ecf2e1471a18812b668658197239)
Date Mon, 13 Oct 2014 18:35:15 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.6 6da637ec1 -> 9d73c1b15


YARN-2377. Localization exception stack traces are not passed as diagnostic info. Contributed
by Gera Shegalov
(cherry picked from commit a56ea0100215ecf2e1471a18812b668658197239)


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

Branch: refs/heads/branch-2.6
Commit: 9d73c1b15f94fcf1e99e5d6171d2508151a24e99
Parents: 6da637e
Author: Jason Lowe <jlowe@apache.org>
Authored: Mon Oct 13 18:31:16 2014 +0000
Committer: Jason Lowe <jlowe@apache.org>
Committed: Mon Oct 13 18:34:28 2014 +0000

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                   |  3 +++
 .../yarn/api/records/SerializedException.java     | 18 ++++++++++++++++++
 .../localizer/ResourceLocalizationService.java    |  6 +++---
 3 files changed, 24 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/9d73c1b1/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 2ebae00..37bca0a 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -570,6 +570,9 @@ Release 2.6.0 - UNRELEASED
     YARN-2651. Spun off LogRollingInterval from LogAggregationContext. (Xuan Gong
     via zjshen)
 
+    YARN-2377. Localization exception stack traces are not passed as
+    diagnostic info (Gera Shegalov via jlowe)
+
 Release 2.5.1 - 2014-09-05
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9d73c1b1/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/SerializedException.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/SerializedException.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/SerializedException.java
index aba54d4..9355a23 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/SerializedException.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/SerializedException.java
@@ -90,4 +90,22 @@ public abstract class SerializedException {
   @Private
   @Unstable
   public abstract Throwable deSerialize();
+
+  private void stringify(StringBuilder sb) {
+    sb.append(getMessage())
+        .append("\n")
+        .append(getRemoteTrace());
+    final SerializedException cause = getCause();
+    if (cause != null) {
+      sb.append("Caused by: ");
+      cause.stringify(sb);
+    }
+  }
+
+  @Override
+  public String toString() {
+    final StringBuilder sb = new StringBuilder(128);
+    stringify(sb);
+    return sb.toString();
+  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9d73c1b1/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.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/localizer/ResourceLocalizationService.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java
index c2dcebf..d3b33e8 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java
@@ -1008,12 +1008,12 @@ public class ResourceLocalizationService extends CompositeService
             response.setLocalizerAction(LocalizerAction.LIVE);
             break;
           case FETCH_FAILURE:
-            LOG.info("DEBUG: FAILED " + req 
-                + ", " + stat.getException().getMessage());
+            final String diagnostics = stat.getException().toString();
+            LOG.warn(req + " failed: " + diagnostics);
             response.setLocalizerAction(LocalizerAction.DIE);
             getLocalResourcesTracker(req.getVisibility(), user, applicationId)
               .handle(new ResourceFailedLocalizationEvent(
-                  req, stat.getException().getMessage()));
+                  req, diagnostics));
 
             // unlocking the resource and removing it from scheduled resource
             // list


Mime
View raw message