|
@@ -31,6 +31,7 @@ import java.util.concurrent.Future;
|
|
|
import java.util.concurrent.LinkedBlockingQueue;
|
|
|
|
|
|
import com.google.common.annotations.VisibleForTesting;
|
|
|
+
|
|
|
import org.apache.commons.logging.Log;
|
|
|
import org.apache.commons.logging.LogFactory;
|
|
|
import org.apache.hadoop.fs.FSError;
|
|
@@ -57,6 +58,7 @@ import org.apache.hadoop.mapreduce.v2.app.launcher.ContainerLauncherEvent;
|
|
|
import org.apache.hadoop.mapreduce.v2.app.launcher.ContainerRemoteLaunchEvent;
|
|
|
import org.apache.hadoop.service.AbstractService;
|
|
|
import org.apache.hadoop.util.ExitUtil;
|
|
|
+import org.apache.hadoop.util.ShutdownHookManager;
|
|
|
import org.apache.hadoop.util.StringUtils;
|
|
|
import org.apache.hadoop.yarn.api.ApplicationConstants.Environment;
|
|
|
import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
|
|
@@ -406,7 +408,9 @@ public class LocalContainerLauncher extends AbstractService implements
|
|
|
} catch (FSError e) {
|
|
|
LOG.fatal("FSError from child", e);
|
|
|
// umbilical: MRAppMaster creates (taskAttemptListener), passes to us
|
|
|
- umbilical.fsError(classicAttemptID, e.getMessage());
|
|
|
+ if (!ShutdownHookManager.get().isShutdownInProgress()) {
|
|
|
+ umbilical.fsError(classicAttemptID, e.getMessage());
|
|
|
+ }
|
|
|
throw new RuntimeException();
|
|
|
|
|
|
} catch (Exception exception) {
|
|
@@ -429,11 +433,13 @@ public class LocalContainerLauncher extends AbstractService implements
|
|
|
} catch (Throwable throwable) {
|
|
|
LOG.fatal("Error running local (uberized) 'child' : "
|
|
|
+ StringUtils.stringifyException(throwable));
|
|
|
- Throwable tCause = throwable.getCause();
|
|
|
- String cause = (tCause == null)
|
|
|
- ? throwable.getMessage()
|
|
|
- : StringUtils.stringifyException(tCause);
|
|
|
- umbilical.fatalError(classicAttemptID, cause);
|
|
|
+ if (!ShutdownHookManager.get().isShutdownInProgress()) {
|
|
|
+ Throwable tCause = throwable.getCause();
|
|
|
+ String cause =
|
|
|
+ (tCause == null) ? throwable.getMessage() : StringUtils
|
|
|
+ .stringifyException(tCause);
|
|
|
+ umbilical.fatalError(classicAttemptID, cause);
|
|
|
+ }
|
|
|
throw new RuntimeException();
|
|
|
}
|
|
|
}
|