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

(cherry picked from commit 4f63ffe444)
This commit is contained in:
Weiwei Yang 2019-01-29 10:34:26 +08:00
parent 8c332affa8
commit 6b8dd8d113
1 changed files with 7 additions and 1 deletions

View File

@ -628,7 +628,13 @@ public class NodeStatusUpdaterImpl extends AbstractService implements
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;
}