YARN-5813. Slider should not try to set a negative lifetime timeout value. Contributed by Jian He
This commit is contained in:
parent
3741e5518f
commit
25411a1742
@ -2120,7 +2120,9 @@ protected AppMasterLauncher setupAppMasterLauncher(String clustername,
|
||||
amLauncher.setKeepContainersOverRestarts(true);
|
||||
// set lifetime in submission context;
|
||||
Map<ApplicationTimeoutType, Long> appTimeout = new HashMap<>();
|
||||
appTimeout.put(ApplicationTimeoutType.LIFETIME, lifetime);
|
||||
if (lifetime >= 0) {
|
||||
appTimeout.put(ApplicationTimeoutType.LIFETIME, lifetime);
|
||||
}
|
||||
amLauncher.submissionContext.setApplicationTimeouts(appTimeout);
|
||||
int maxAppAttempts = config.getInt(KEY_AM_RESTART_LIMIT, 0);
|
||||
amLauncher.setMaxAppAttempts(maxAppAttempts);
|
||||
|
Loading…
Reference in New Issue
Block a user