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

View File

@ -630,7 +630,13 @@ protected List<ContainerStatus> getContainerStatuses() throws IOException {
private List<ApplicationId> getRunningApplications() {
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;
}