Class SignalUtils

Object
org.apache.spark.util.SignalUtils

public class SignalUtils extends Object
Contains utilities for working with posix signals.
  • Constructor Details

    • SignalUtils

      public SignalUtils()
  • Method Details

    • registerLogger

      public static void registerLogger(org.slf4j.Logger log)
      Register a signal handler to log signals on UNIX-like systems.
    • register

      public static void register(String signal, scala.Function0<Object> action)
      Adds an action to be run when a given signal is received by this process.

      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.

      Parameters:
      signal - (undocumented)
      action - (undocumented)
    • register

      public static void register(String signal, org.apache.spark.internal.MessageWithContext failMessage, boolean logStackTrace, scala.Function0<Object> action)
      Adds an action to be run when a given signal is received by this process.

      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.

      Parameters:
      signal - (undocumented)
      failMessage - (undocumented)
      logStackTrace - (undocumented)
      action - (undocumented)
    • org$apache$spark$internal$Logging$$log_

      public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_()
    • org$apache$spark$internal$Logging$$log__$eq

      public static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1)
    • LogStringContext

      public static org.apache.spark.internal.Logging.LogStringContext LogStringContext(scala.StringContext sc)