Interface SafeMode


public interface SafeMode
Whether the given filesystem is in any status of safe mode.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Enter, leave, or get safe mode.
    boolean
    setSafeMode(SafeModeAction action, boolean isChecked)
    Enter, leave, or get safe mode.
  • Method Details

    • setSafeMode

      default boolean setSafeMode(SafeModeAction action) throws IOException
      Enter, leave, or get safe mode.
      Parameters:
      action - One of SafeModeAction LEAVE, ENTER, GET, FORCE_EXIT.
      Returns:
      true if the action is successfully accepted, otherwise false means rejected.
      Throws:
      IOException - if set safe mode fails to proceed.
    • setSafeMode

      boolean setSafeMode(SafeModeAction action, boolean isChecked) throws IOException
      Enter, leave, or get safe mode.
      Parameters:
      action - One of SafeModeAction LEAVE, ENTER, GET, FORCE_EXIT.
      isChecked - If true check only for Active metadata node / NameNode's status, else check first metadata node / NameNode's status.
      Returns:
      true if the action is successfully accepted, otherwise false means rejected.
      Throws:
      IOException - if set safe mode fails to proceed.