public class SignalUtils
extends Object
Constructor and Description |
---|
SignalUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) |
static org.slf4j.Logger |
org$apache$spark$internal$Logging$$log_() |
static void |
register(String signal,
scala.Function0<Object> action)
Adds an action to be run when a given signal is received by this process.
|
static void |
register(String signal,
String failMessage,
boolean logStackTrace,
scala.Function0<Object> action)
Adds an action to be run when a given signal is received by this process.
|
static void |
registerLogger(org.slf4j.Logger log)
Register a signal handler to log signals on UNIX-like systems.
|
public static void registerLogger(org.slf4j.Logger log)
public static void register(String signal, scala.Function0<Object> action)
Note that signals are only supported on unix-like operating systems and work on a best-effort basis: if a signal is not available or cannot be intercepted, only a warning is emitted.
All actions for a given signal are run in a separate thread.
signal
- (undocumented)action
- (undocumented)public static void register(String signal, String failMessage, boolean logStackTrace, scala.Function0<Object> action)
This method receives failMessage as additional parameter, which would be logged when it fails to register the signal. Here the failures include the cases 1) OS doesn't support signal at all 2) OS doesn't support given signal (Could be possible with non-POSIX signals)
All actions for a given signal are run in a separate thread.
signal
- (undocumented)failMessage
- (undocumented)logStackTrace
- (undocumented)action
- (undocumented)public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_()
public static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1)