YARN-9237. NM should ignore sending finished apps to RM during RM fail-over. Contributed by Jiandan Yang.

This commit is contained in:
Weiwei Yang 2019-01-29 10:34:26 +08:00
parent f5a95f7998
commit 4f63ffe444
1 changed files with 7 additions and 1 deletions

View File

@ -630,7 +630,13 @@ public class NodeStatusUpdaterImpl extends AbstractService implements
private List<ApplicationId> getRunningApplications() { private List<ApplicationId> getRunningApplications() {
List<ApplicationId> runningApplications = new ArrayList<ApplicationId>(); List<ApplicationId> runningApplications = new ArrayList<ApplicationId>();
runningApplications.addAll(this.context.getApplications().keySet()); for (Entry<ApplicationId, Application> appEntry : this.context
.getApplications().entrySet()) {
if (ApplicationState.FINISHED != appEntry.getValue()
.getApplicationState()) {
runningApplications.add(appEntry.getKey());
}
}
return runningApplications; return runningApplications;
} }