Enum Class SignalLogger

java.lang.Object
java.lang.Enum<SignalLogger>
org.apache.hadoop.util.SignalLogger
All Implemented Interfaces:
Serializable, Comparable<SignalLogger>, Constable

@Private @Unstable public enum SignalLogger extends Enum<SignalLogger>
This class logs a message whenever we're about to exit on a UNIX signal. This is helpful for determining the root cause of a process' exit. For example, if the process exited because the system administrator ran a standard "kill," you would see 'EXITING ON SIGNAL SIGTERM' in the log.
  • Enum Constant Details

  • Method Details

    • values

      public static SignalLogger[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SignalLogger valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • register

      public void register(org.slf4j.Logger log)
      Register some signal handlers.
      Parameters:
      log - The log4j logfile to use in the signal handlers.