Permalink
Browse files

Finish logging when containers finish running

  • Loading branch information...
1 parent b87e687 commit 40a51c17bee685fe382512602ba906fbe3fc504c @jwills jwills committed Jul 16, 2012
@@ -164,6 +164,7 @@ protected void shutDown() {
for (ContainerTracker tracker : containerTrackers) {
tracker.stopServices();
}
+ this.hasRunningContainers = false;
FinishApplicationMasterRequest finishReq = Records.newRecord(
FinishApplicationMasterRequest.class);
@@ -194,11 +195,13 @@ protected void runOneIteration() throws Exception {
return;
}
- boolean moreWork = false;
- for (ContainerTracker tracker : containerTrackers) {
- moreWork |= tracker.doWork();
+ if (hasRunningContainers) {
+ boolean moreWork = false;
+ for (ContainerTracker tracker : containerTrackers) {
+ moreWork |= tracker.doWork();
+ }
+ this.hasRunningContainers = moreWork;
}
- this.hasRunningContainers = moreWork;
}
private class ContainerTracker {

0 comments on commit 40a51c1

Please sign in to comment.