YARN-5131. Distributed shell AM fails when extra container arrives during finishing. Contributed by Wangda Tan.

This commit is contained in:
Junping Du 2016-05-25 06:18:11 -07:00
parent dcbb7009b6
commit 48c931331c
1 changed files with 2 additions and 2 deletions

View File

@ -745,8 +745,8 @@ public class ApplicationMaster {
FinalApplicationStatus appStatus;
String appMessage = null;
boolean success = true;
if (numFailedContainers.get() == 0 &&
numCompletedContainers.get() == numTotalContainers) {
if (numCompletedContainers.get() - numFailedContainers.get()
>= numTotalContainers) {
appStatus = FinalApplicationStatus.SUCCEEDED;
} else {
appStatus = FinalApplicationStatus.FAILED;