YARN-7607. Remove the trailing duplicated timestamp in container diagnostics message. Contributed by Weiwei Yang.
This commit is contained in:
parent
a8be4b559a
commit
27c7a1f221
|
@ -1536,7 +1536,7 @@ public class ContainerImpl implements Container {
|
||||||
ContainerExitEvent exitEvent = (ContainerExitEvent) event;
|
ContainerExitEvent exitEvent = (ContainerExitEvent) event;
|
||||||
container.exitCode = exitEvent.getExitCode();
|
container.exitCode = exitEvent.getExitCode();
|
||||||
if (exitEvent.getDiagnosticInfo() != null) {
|
if (exitEvent.getDiagnosticInfo() != null) {
|
||||||
container.addDiagnostics(exitEvent.getDiagnosticInfo(), "\n");
|
container.addDiagnostics(exitEvent.getDiagnosticInfo() + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Add containerWorkDir to the deletion service.
|
// TODO: Add containerWorkDir to the deletion service.
|
||||||
|
@ -1573,7 +1573,7 @@ public class ContainerImpl implements Container {
|
||||||
container.addDiagnostics("Diagnostic message from attempt "
|
container.addDiagnostics("Diagnostic message from attempt "
|
||||||
+ n + " : ", "\n");
|
+ n + " : ", "\n");
|
||||||
}
|
}
|
||||||
container.addDiagnostics(exitEvent.getDiagnosticInfo(), "\n");
|
container.addDiagnostics(exitEvent.getDiagnosticInfo() + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (container.shouldRetry(container.exitCode)) {
|
if (container.shouldRetry(container.exitCode)) {
|
||||||
|
@ -1732,7 +1732,7 @@ public class ContainerImpl implements Container {
|
||||||
|
|
||||||
ContainerResourceFailedEvent rsrcFailedEvent =
|
ContainerResourceFailedEvent rsrcFailedEvent =
|
||||||
(ContainerResourceFailedEvent) event;
|
(ContainerResourceFailedEvent) event;
|
||||||
container.addDiagnostics(rsrcFailedEvent.getDiagnosticMessage(), "\n");
|
container.addDiagnostics(rsrcFailedEvent.getDiagnosticMessage() + "\n");
|
||||||
|
|
||||||
// Inform the localizer to decrement reference counts and cleanup
|
// Inform the localizer to decrement reference counts and cleanup
|
||||||
// resources.
|
// resources.
|
||||||
|
@ -1755,7 +1755,7 @@ public class ContainerImpl implements Container {
|
||||||
container.metrics.endInitingContainer();
|
container.metrics.endInitingContainer();
|
||||||
ContainerKillEvent killEvent = (ContainerKillEvent) event;
|
ContainerKillEvent killEvent = (ContainerKillEvent) event;
|
||||||
container.exitCode = killEvent.getContainerExitStatus();
|
container.exitCode = killEvent.getContainerExitStatus();
|
||||||
container.addDiagnostics(killEvent.getDiagnostic(), "\n");
|
container.addDiagnostics(killEvent.getDiagnostic() + "\n");
|
||||||
container.addDiagnostics("Container is killed before being launched.\n");
|
container.addDiagnostics("Container is killed before being launched.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1794,7 +1794,7 @@ public class ContainerImpl implements Container {
|
||||||
new ContainersLauncherEvent(container,
|
new ContainersLauncherEvent(container,
|
||||||
ContainersLauncherEventType.CLEANUP_CONTAINER));
|
ContainersLauncherEventType.CLEANUP_CONTAINER));
|
||||||
ContainerKillEvent killEvent = (ContainerKillEvent) event;
|
ContainerKillEvent killEvent = (ContainerKillEvent) event;
|
||||||
container.addDiagnostics(killEvent.getDiagnostic(), "\n");
|
container.addDiagnostics(killEvent.getDiagnostic() + "\n");
|
||||||
container.exitCode = killEvent.getContainerExitStatus();
|
container.exitCode = killEvent.getContainerExitStatus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1833,7 +1833,7 @@ public class ContainerImpl implements Container {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exitEvent.getDiagnosticInfo() != null) {
|
if (exitEvent.getDiagnosticInfo() != null) {
|
||||||
container.addDiagnostics(exitEvent.getDiagnosticInfo(), "\n");
|
container.addDiagnostics(exitEvent.getDiagnosticInfo() + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// The process/process-grp is killed. Decrement reference counts and
|
// The process/process-grp is killed. Decrement reference counts and
|
||||||
|
@ -1885,7 +1885,7 @@ public class ContainerImpl implements Container {
|
||||||
} else {
|
} else {
|
||||||
ContainerKillEvent killEvent = (ContainerKillEvent) event;
|
ContainerKillEvent killEvent = (ContainerKillEvent) event;
|
||||||
container.exitCode = killEvent.getContainerExitStatus();
|
container.exitCode = killEvent.getContainerExitStatus();
|
||||||
container.addDiagnostics(killEvent.getDiagnostic(), "\n");
|
container.addDiagnostics(killEvent.getDiagnostic() + "\n");
|
||||||
container.addDiagnostics("Container is killed before being launched.\n");
|
container.addDiagnostics("Container is killed before being launched.\n");
|
||||||
container.metrics.killedContainer();
|
container.metrics.killedContainer();
|
||||||
NMAuditLogger.logSuccess(container.user,
|
NMAuditLogger.logSuccess(container.user,
|
||||||
|
@ -2005,7 +2005,7 @@ public class ContainerImpl implements Container {
|
||||||
public void transition(ContainerImpl container, ContainerEvent event) {
|
public void transition(ContainerImpl container, ContainerEvent event) {
|
||||||
ContainerDiagnosticsUpdateEvent updateEvent =
|
ContainerDiagnosticsUpdateEvent updateEvent =
|
||||||
(ContainerDiagnosticsUpdateEvent) event;
|
(ContainerDiagnosticsUpdateEvent) event;
|
||||||
container.addDiagnostics(updateEvent.getDiagnosticsUpdate(), "\n");
|
container.addDiagnostics(updateEvent.getDiagnosticsUpdate() + "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2023,7 +2023,7 @@ public class ContainerImpl implements Container {
|
||||||
new ContainersLauncherEvent(container,
|
new ContainersLauncherEvent(container,
|
||||||
ContainersLauncherEventType.PAUSE_CONTAINER));
|
ContainersLauncherEventType.PAUSE_CONTAINER));
|
||||||
ContainerPauseEvent pauseEvent = (ContainerPauseEvent) event;
|
ContainerPauseEvent pauseEvent = (ContainerPauseEvent) event;
|
||||||
container.addDiagnostics(pauseEvent.getDiagnostic(), "\n");
|
container.addDiagnostics(pauseEvent.getDiagnostic() + "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2056,7 +2056,7 @@ public class ContainerImpl implements Container {
|
||||||
new ContainersLauncherEvent(container,
|
new ContainersLauncherEvent(container,
|
||||||
ContainersLauncherEventType.RESUME_CONTAINER));
|
ContainersLauncherEventType.RESUME_CONTAINER));
|
||||||
ContainerResumeEvent resumeEvent = (ContainerResumeEvent) event;
|
ContainerResumeEvent resumeEvent = (ContainerResumeEvent) event;
|
||||||
container.addDiagnostics(resumeEvent.getDiagnostic(), "\n");
|
container.addDiagnostics(resumeEvent.getDiagnostic() + "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue