From aa85ce73de0720b39dfa54ca3547ec1027d8161e Mon Sep 17 00:00:00 2001 From: Wangda Tan Date: Mon, 28 Dec 2015 11:03:23 -0800 Subject: [PATCH] MAPREDUCE-6574. MR AM should print host of failed tasks. (Mohammad Shahid Khan via wangda) (cherry picked from commit 32b3dc11eba8f2d8f22ca502bf30d6aa8839460e) (cherry picked from commit ca575e6addb801accafa7e3a6dad08d75cf79bdc) --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../mapreduce/v2/app/job/impl/TaskAttemptImpl.java | 13 ++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index fbc107f9982..8113cfba200 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -145,6 +145,9 @@ Release 2.8.0 - UNRELEASED MAPREDUCE-6566. Add retry support to mapreduce CLI tool. (Varun Vasudev via xgong) + MAPREDUCE-6574. MR AM should print host of failed tasks. + (Mohammad Shahid Khan via wangda) + OPTIMIZATIONS MAPREDUCE-6376. Add avro binary support for jhist files (Ray Chiang via diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TaskAttemptImpl.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TaskAttemptImpl.java index ac3cf576d0f..f6d144bafe1 100755 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TaskAttemptImpl.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TaskAttemptImpl.java @@ -1214,9 +1214,16 @@ public abstract class TaskAttemptImpl implements JobEventType.INTERNAL_ERROR)); } if (oldState != getInternalState()) { - LOG.info(attemptId + " TaskAttempt Transitioned from " - + oldState + " to " - + getInternalState()); + if (getInternalState() == TaskAttemptStateInternal.FAILED) { + String nodeId = null == this.container ? "Not-assigned" + : this.container.getNodeId().toString(); + LOG.info(attemptId + " transitioned from state " + oldState + " to " + + getInternalState() + ", event type is " + event.getType() + + " and nodeId=" + nodeId); + } else { + LOG.info(attemptId + " TaskAttempt Transitioned from " + oldState + + " to " + getInternalState()); + } } } finally { writeLock.unlock();