YARN-5103. With NM recovery enabled, restarting NM multiple times results in AM restart. Contributed by Junping Du
(cherry picked from commit d1df0266cf
)
This commit is contained in:
parent
4422beab72
commit
8e404b4321
|
@ -19,6 +19,7 @@
|
||||||
package org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher;
|
package org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.InterruptedIOException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
@ -90,11 +91,11 @@ public class RecoveredContainerLaunch extends ContainerLaunch {
|
||||||
} else {
|
} else {
|
||||||
LOG.warn("Unable to locate pid file for container " + containerIdStr);
|
LOG.warn("Unable to locate pid file for container " + containerIdStr);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (InterruptedException | InterruptedIOException e) {
|
||||||
LOG.error("Unable to recover container " + containerIdStr, e);
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
LOG.warn("Interrupted while waiting for exit code from " + containerId);
|
LOG.warn("Interrupted while waiting for exit code from " + containerId);
|
||||||
notInterrupted = false;
|
notInterrupted = false;
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOG.error("Unable to recover container " + containerIdStr, e);
|
||||||
} finally {
|
} finally {
|
||||||
if (notInterrupted) {
|
if (notInterrupted) {
|
||||||
this.completed.set(true);
|
this.completed.set(true);
|
||||||
|
|
Loading…
Reference in New Issue