Github user tgravescs commented on a diff in the pull request:
https://github.com/apache/spark/pull/11512#discussion_r55375068
--- Diff:
yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala ---
@@ -116,6 +118,21 @@ private[spark] class ApplicationMaster(
private var delegationTokenRenewerOption:
Option[AMDelegationTokenRenewer] = None
+ if (SystemUtils.IS_OS_UNIX) {
+ // Register signal handler for signal "TERM", "INT" and "HUP". For the
cases where AM receive a
+ // signal and stop, from RM's aspect this application needs to be
reattempted, rather than mark
+ // as success.
+ // Replace this signal handler with SignalLogger in AM side.
+ val signalHandler = new SignalHandler() {
+ override def handle(sig: Signal): Unit = {
+
+ logInfo(s"received signal: ${sig.getName}")
--- End diff --
I'd rather see this have same information as message in the signallogger:
log.error("RECEIVED SIGNAL " + signal.getNumber() + ": SIG" +
signal.getName())
You can add something to indicate from AM and not signal logger if you want
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]