From e5ba40cc98e1b1f1e56a4b97df185b8cdf77582c Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Mon, 14 Aug 2017 14:40:08 -0500 Subject: [PATCH] YARN-6987. Log app attempt during InvalidStateTransition. Contributed by Jonathan Eagles (cherry picked from commit 3325ef653d6f364a82dd32485d9ef6d987380ce3) --- .../hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java | 3 ++- .../server/resourcemanager/rmapp/attempt/RMAppAttemptImpl.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 ab55dfe31d8..181c5f40c02 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 @@ -837,7 +837,8 @@ public class RMAppImpl implements RMApp, Recoverable { /* keep the master in sync with the state machine */ this.stateMachine.doTransition(event.getType(), event); } catch (InvalidStateTransitionException e) { - LOG.error("Can't handle this event at current state", e); + LOG.error("App: " + appID + + " can't handle this event at current state", e); /* TODO fail the application on the failed transition */ } 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/attempt/RMAppAttemptImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/attempt/RMAppAttemptImpl.java index d2fa2149fa9..1b310c26600 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/attempt/RMAppAttemptImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/attempt/RMAppAttemptImpl.java @@ -912,7 +912,8 @@ public class RMAppAttemptImpl implements RMAppAttempt, Recoverable { /* keep the master in sync with the state machine */ this.stateMachine.doTransition(event.getType(), event); } catch (InvalidStateTransitionException e) { - LOG.error("Can't handle this event at current state", e); + LOG.error("App attempt: " + appAttemptID + + " can't handle this event at current state", e); /* TODO fail the application on the failed transition */ }