Repository: hadoop Updated Branches: refs/heads/branch-2 21f920ab8 -> d977205b9
YARN-2627. Added the info logs of attemptFailuresValidityInterval and number of previous failed attempts. Contributed by Xuan Gong. (cherry picked from commit 9582a50176800433ad3fa8829a50c28b859812a3) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d977205b Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d977205b Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d977205b Branch: refs/heads/branch-2 Commit: d977205b9b1538f3e5ca250b9ce61f799ec4374c Parents: 21f920a Author: Zhijie Shen <zjs...@apache.org> Authored: Tue Sep 30 12:57:45 2014 -0700 Committer: Zhijie Shen <zjs...@apache.org> Committed: Tue Sep 30 12:59:34 2014 -0700 ---------------------------------------------------------------------- hadoop-yarn-project/CHANGES.txt | 3 +++ .../yarn/server/resourcemanager/rmapp/RMAppImpl.java | 11 +++++++++++ 2 files changed, 14 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/d977205b/hadoop-yarn-project/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index ce1d357..c773145 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -250,6 +250,9 @@ Release 2.6.0 - UNRELEASED YARN-1769. CapacityScheduler: Improve reservations (Thomas Graves via jlowe) + YARN-2627. Added the info logs of attemptFailuresValidityInterval and number + of previous failed attempts. (Xuan Gong via zjshen) + OPTIMIZATIONS BUG FIXES http://git-wip-us.apache.org/repos/asf/hadoop/blob/d977205b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java index 0b8f321..eaef7d2 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java @@ -376,6 +376,11 @@ public class RMAppImpl implements RMApp, Recoverable { this.attemptFailuresValidityInterval = submissionContext.getAttemptFailuresValidityInterval(); + if (this.attemptFailuresValidityInterval > 0) { + LOG.info("The attemptFailuresValidityInterval for the application: " + + this.applicationId + " is " + this.attemptFailuresValidityInterval + + "."); + } ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); this.readLock = lock.readLock(); @@ -1179,6 +1184,11 @@ public class RMAppImpl implements RMApp, Recoverable { @Override public RMAppState transition(RMAppImpl app, RMAppEvent event) { int numberOfFailure = app.getNumFailedAppAttempts(); + LOG.info("The number of failed attempts" + + (app.attemptFailuresValidityInterval > 0 ? " in previous " + + app.attemptFailuresValidityInterval + " milliseconds " : " ") + + "is " + numberOfFailure + ". The max attempts is " + + app.maxAppAttempts); if (!app.submissionContext.getUnmanagedAM() && numberOfFailure < app.maxAppAttempts) { boolean transferStateFromPreviousAttempt; @@ -1293,4 +1303,5 @@ public class RMAppImpl implements RMApp, Recoverable { public void setSystemClock(Clock clock) { this.systemClock = clock; } + }