Class NameNodeResourceChecker

java.lang.Object
org.apache.hadoop.hdfs.server.namenode.NameNodeResourceChecker

@Private public class NameNodeResourceChecker extends Object
NameNodeResourceChecker provides a method - hasAvailableDiskSpace - which will return true if and only if the NameNode has disk space available on all required volumes, and any volume which is configured to be redundant. Volumes containing file system edits dirs are added by default, and arbitrary extra volumes may be configured as well.
  • Constructor Summary

    Constructors
    Constructor
    Description
    NameNodeResourceChecker(org.apache.hadoop.conf.Configuration conf)
    Create a NameNodeResourceChecker, which will check the edits dirs and any additional dirs to check set in conf.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Return true if disk space is available on at least one of the configured redundant volumes, and all of the configured required volumes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NameNodeResourceChecker

      public NameNodeResourceChecker(org.apache.hadoop.conf.Configuration conf) throws IOException
      Create a NameNodeResourceChecker, which will check the edits dirs and any additional dirs to check set in conf.
      Throws:
      IOException
  • Method Details

    • hasAvailableDiskSpace

      public boolean hasAvailableDiskSpace()
      Return true if disk space is available on at least one of the configured redundant volumes, and all of the configured required volumes.
      Returns:
      True if the configured amount of disk space is available on at least one redundant volume and all of the required volumes, false otherwise.