YARN-6205. Default lifetime for native services app is invalid. Contributed by Billie Rinaldi

This commit is contained in:
Gour Saha 2017-02-21 09:04:04 -08:00 committed by Jian He
parent 500695d726
commit 0ed8d4ebe6

View File

@ -2070,7 +2070,7 @@ protected AppMasterLauncher setupAppMasterLauncher(String clustername,
amLauncher.setKeepContainersOverRestarts(true);
// set lifetime in submission context;
Map<ApplicationTimeoutType, Long> appTimeout = new HashMap<>();
if (lifetime >= 0) {
if (lifetime > 0) {
appTimeout.put(ApplicationTimeoutType.LIFETIME, lifetime);
}
amLauncher.submissionContext.setApplicationTimeouts(appTimeout);