YARN-9483. DistributedShell does not release container when failed to localize at launch. Contributed by Prabhu Joseph.

This commit is contained in:
Giovanni Matteo Fumarola 2019-05-09 10:59:31 -07:00
parent 18cca583ac
commit ec36126346
1 changed files with 4 additions and 0 deletions

View File

@ -1475,6 +1475,8 @@ public class ApplicationMaster {
try {
fs = FileSystem.get(conf);
} catch (IOException e) {
numCompletedContainers.incrementAndGet();
numFailedContainers.incrementAndGet();
throw new UncheckedIOException("Cannot get FileSystem", e);
}
@ -1492,6 +1494,8 @@ public class ApplicationMaster {
LOG.info("Setting up file for localization: " + dst);
localResources.put(fileName, localRes);
} catch (IOException e) {
numCompletedContainers.incrementAndGet();
numFailedContainers.incrementAndGet();
throw new UncheckedIOException(
"Error during localization setup", e);
}