YARN-9349. Improved log level practices for InvalidStateTransitionException.
Contributed by Anuhan Torgonshar (cherry picked from commit fe2370e039e1ee980d74769ae85d67434e0993cf)
This commit is contained in:
parent
e543c3b31a
commit
9cf7401794
@ -646,7 +646,7 @@ public void handle(ApplicationEvent event) {
|
|||||||
// queue event requesting init of the same app
|
// queue event requesting init of the same app
|
||||||
newState = stateMachine.doTransition(event.getType(), event);
|
newState = stateMachine.doTransition(event.getType(), event);
|
||||||
} catch (InvalidStateTransitionException e) {
|
} 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) {
|
if (newState != null && oldState != newState) {
|
||||||
LOG.info("Application " + applicationID + " transitioned from "
|
LOG.info("Application " + applicationID + " transitioned from "
|
||||||
|
@ -2125,7 +2125,7 @@ public void handle(ContainerEvent event) {
|
|||||||
newState =
|
newState =
|
||||||
stateMachine.doTransition(event.getType(), event);
|
stateMachine.doTransition(event.getType(), event);
|
||||||
} catch (InvalidStateTransitionException e) {
|
} 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() + "]," +
|
+ oldState + "], eventType: [" + event.getType() + "]," +
|
||||||
" container: [" + containerID + "]", e);
|
" container: [" + containerID + "]", e);
|
||||||
}
|
}
|
||||||
|
@ -196,7 +196,7 @@ public void handle(ResourceEvent event) {
|
|||||||
try {
|
try {
|
||||||
newState = this.stateMachine.doTransition(event.getType(), event);
|
newState = this.stateMachine.doTransition(event.getType(), event);
|
||||||
} catch (InvalidStateTransitionException e) {
|
} 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) {
|
if (newState != null && oldState != newState) {
|
||||||
LOG.debug("Resource {}{} size : {} transitioned from {} to {}",
|
LOG.debug("Resource {}{} size : {} transitioned from {} to {}",
|
||||||
|
Loading…
Reference in New Issue
Block a user