YARN-219. NM should aggregate logs when application finishes. (bobby)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1411289 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e464607b7d
commit
f0a6d06485
@ -247,6 +247,8 @@ Release 0.23.5 - UNRELEASED
|
|||||||
YARN-212. NM state machine ignores an APPLICATION_CONTAINER_FINISHED event
|
YARN-212. NM state machine ignores an APPLICATION_CONTAINER_FINISHED event
|
||||||
when it shouldn't (Nathan Roberts via jlowe)
|
when it shouldn't (Nathan Roberts via jlowe)
|
||||||
|
|
||||||
|
YARN-219. NM should aggregate logs when application finishes. (bobby)
|
||||||
|
|
||||||
Release 0.23.4
|
Release 0.23.4
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -149,16 +149,13 @@ private void doAppLogAggregation() {
|
|||||||
ContainerId containerId;
|
ContainerId containerId;
|
||||||
|
|
||||||
while (!this.appFinishing.get()) {
|
while (!this.appFinishing.get()) {
|
||||||
try {
|
synchronized(this) {
|
||||||
containerId = this.pendingContainers.poll();
|
try {
|
||||||
if (containerId == null) {
|
wait(THREAD_SLEEP_TIME);
|
||||||
Thread.sleep(THREAD_SLEEP_TIME);
|
} catch (InterruptedException e) {
|
||||||
} else {
|
LOG.warn("PendingContainers queue is interrupted");
|
||||||
uploadLogsForContainer(containerId);
|
this.appFinishing.set(true);
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
|
||||||
LOG.warn("PendingContainers queue is interrupted");
|
|
||||||
this.appFinishing.set(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,8 +248,9 @@ public void startContainerLogAggregation(ContainerId containerId,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void finishLogAggregation() {
|
public synchronized void finishLogAggregation() {
|
||||||
LOG.info("Application just finished : " + this.applicationId);
|
LOG.info("Application just finished : " + this.applicationId);
|
||||||
this.appFinishing.set(true);
|
this.appFinishing.set(true);
|
||||||
|
this.notifyAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user