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 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe
|
||||||
amLauncher.setKeepContainersOverRestarts(true);
|
amLauncher.setKeepContainersOverRestarts(true);
|
||||||
// set lifetime in submission context;
|
// set lifetime in submission context;
|
||||||
Map<ApplicationTimeoutType, Long> appTimeout = new HashMap<>();
|
Map<ApplicationTimeoutType, Long> appTimeout = new HashMap<>();
|
||||||
appTimeout.put(ApplicationTimeoutType.LIFETIME, lifetime);
|
if (lifetime >= 0) {
|
||||||
|
appTimeout.put(ApplicationTimeoutType.LIFETIME, lifetime);
|
||||||
|
}
|
||||||
amLauncher.submissionContext.setApplicationTimeouts(appTimeout);
|
amLauncher.submissionContext.setApplicationTimeouts(appTimeout);
|
||||||
int maxAppAttempts = config.getInt(KEY_AM_RESTART_LIMIT, 0);
|
int maxAppAttempts = config.getInt(KEY_AM_RESTART_LIMIT, 0);
|
||||||
amLauncher.setMaxAppAttempts(maxAppAttempts);
|
amLauncher.setMaxAppAttempts(maxAppAttempts);
|
||||||
|
|
Loading…
Reference in New Issue