YARN-9349. Improved log level practices for InvalidStateTransitionException.

Contributed by Anuhan Torgonshar

(cherry picked from commit fe2370e039e1ee980d74769ae85d67434e0993cf)
This commit is contained in:
Eric Yang 2019-04-16 19:51:08 -04:00
parent e543c3b31a
commit 9cf7401794
3 changed files with 3 additions and 3 deletions

View File

@ -646,7 +646,7 @@ public void handle(ApplicationEvent event) {
// 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 "

View File

@ -2125,7 +2125,7 @@ public void handle(ContainerEvent event) {
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);
}

View File

@ -196,7 +196,7 @@ public void handle(ResourceEvent event) {
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 {}",