From 9cf7401794def0d420876db5db20fcd76c52193f Mon Sep 17 00:00:00 2001 From: Eric Yang Date: Tue, 16 Apr 2019 19:51:08 -0400 Subject: [PATCH] YARN-9349. Improved log level practices for InvalidStateTransitionException. Contributed by Anuhan Torgonshar (cherry picked from commit fe2370e039e1ee980d74769ae85d67434e0993cf) --- .../containermanager/application/ApplicationImpl.java | 2 +- .../nodemanager/containermanager/container/ContainerImpl.java | 2 +- .../containermanager/localizer/LocalizedResource.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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/application/ApplicationImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/application/ApplicationImpl.java index f3d4e51d9e7..1806af68351 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/application/ApplicationImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/application/ApplicationImpl.java @@ -646,7 +646,7 @@ public class ApplicationImpl implements Application { // queue event requesting init of the same app newState = stateMachine.doTransition(event.getType(), event); } catch (InvalidStateTransitionException e) { - LOG.warn("Can't handle this event at current state", e); + LOG.error("Can't handle this event at current state", e); } if (newState != null && oldState != newState) { LOG.info("Application " + applicationID + " transitioned from " 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/container/ContainerImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/container/ContainerImpl.java index cfade27f932..b79c305a0e6 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/container/ContainerImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/container/ContainerImpl.java @@ -2125,7 +2125,7 @@ public class ContainerImpl implements Container { newState = stateMachine.doTransition(event.getType(), event); } catch (InvalidStateTransitionException e) { - LOG.warn("Can't handle this event at current state: Current: [" + LOG.error("Can't handle this event at current state: Current: [" + oldState + "], eventType: [" + event.getType() + "]," + " container: [" + containerID + "]", e); } 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/LocalizedResource.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/LocalizedResource.java index 279efd06702..a75a13e956b 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/LocalizedResource.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/LocalizedResource.java @@ -196,7 +196,7 @@ public class LocalizedResource implements EventHandler { try { newState = this.stateMachine.doTransition(event.getType(), event); } catch (InvalidStateTransitionException e) { - LOG.warn("Can't handle this event at current state", e); + LOG.error("Can't handle this event at current state", e); } if (newState != null && oldState != newState) { LOG.debug("Resource {}{} size : {} transitioned from {} to {}",