YARN-9237. NM should ignore sending finished apps to RM during RM fail-over. Contributed by Jiandan Yang.
This commit is contained in:
parent
f5a95f7998
commit
4f63ffe444
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user