YARN-8407. Container launch exception in AM log should be printed in ERROR level. (Yesha Vora via wangda)
Change-Id: I154e873df1df3503a09c41d6b3874ca195af91d9
(cherry picked from commit 861095f761
)
This commit is contained in:
parent
450c791ecf
commit
f2768eaa38
|
@ -251,14 +251,20 @@ public class ComponentInstance implements EventHandler<ComponentInstanceEvent>,
|
||||||
// re-ask the failed container.
|
// re-ask the failed container.
|
||||||
comp.requestContainers(1);
|
comp.requestContainers(1);
|
||||||
comp.reInsertPendingInstance(compInstance);
|
comp.reInsertPendingInstance(compInstance);
|
||||||
LOG.info(compInstance.getCompInstanceId()
|
|
||||||
+ ": {} completed. Reinsert back to pending list and requested " +
|
StringBuilder builder = new StringBuilder();
|
||||||
"a new container." + System.lineSeparator() +
|
builder.append(compInstance.getCompInstanceId()).append(": ");
|
||||||
" exitStatus={}, diagnostics={}.",
|
builder.append(event.getContainerId()).append(" completed. Reinsert back to pending list and requested ");
|
||||||
event.getContainerId(), failureBeforeLaunch ? null :
|
builder.append("a new container.").append(System.lineSeparator());
|
||||||
event.getStatus().getExitStatus(),
|
builder.append(" exitStatus=").append(failureBeforeLaunch ? null : event.getStatus().getExitStatus());
|
||||||
failureBeforeLaunch ? FAILED_BEFORE_LAUNCH_DIAG :
|
builder.append(", diagnostics=");
|
||||||
event.getStatus().getDiagnostics());
|
builder.append(failureBeforeLaunch ? FAILED_BEFORE_LAUNCH_DIAG : event.getStatus().getDiagnostics());
|
||||||
|
|
||||||
|
if (event.getStatus().getExitStatus() != 0) {
|
||||||
|
LOG.error(builder.toString());
|
||||||
|
} else {
|
||||||
|
LOG.info(builder.toString());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// When no relaunch, update component's #succeeded/#failed
|
// When no relaunch, update component's #succeeded/#failed
|
||||||
// instances.
|
// instances.
|
||||||
|
|
Loading…
Reference in New Issue