YARN-5944. Native services AM should remain up if RM is down. Contributed by Billie Rinaldi

This commit is contained in:
Gour Saha 2016-12-01 00:30:01 -08:00 committed by Jian He
parent 6143aa135b
commit 1f44e6a5f4

View File

@ -705,6 +705,11 @@ private int createAndRunCluster(String clustername) throws Throwable {
synchronized (appState) {
int heartbeatInterval = HEARTBEAT_INTERVAL;
// configure AM to wait forever for RM
getConfig().setLong(YarnConfiguration.RESOURCEMANAGER_CONNECT_MAX_WAIT_MS,
-1);
getConfig().unset(YarnConfiguration.CLIENT_FAILOVER_MAX_ATTEMPTS);
// add the RM client -this brings the callbacks in
asyncRMClient = AMRMClientAsync.createAMRMClientAsync(heartbeatInterval, this);
addService(asyncRMClient);