Class DirectoryCollection

java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.DirectoryCollection

public class DirectoryCollection extends Object
Manages a list of local storage directories.
  • Constructor Details

    • DirectoryCollection

      public DirectoryCollection(String[] dirs)
      Create collection for the directories specified. No check for free space.
      Parameters:
      dirs - directories to be monitored
    • DirectoryCollection

      public DirectoryCollection(String[] dirs, float utilizationPercentageCutOff)
      Create collection for the directories specified. Users must specify the maximum percentage of disk utilization allowed. Minimum amount of disk space is not checked.
      Parameters:
      dirs - directories to be monitored
      utilizationPercentageCutOff - percentage of disk that can be used before the dir is taken out of the good dirs list
    • DirectoryCollection

      public DirectoryCollection(String[] dirs, long utilizationSpaceCutOff)
      Create collection for the directories specified. Users must specify the minimum amount of free space that must be available for the dir to be used.
      Parameters:
      dirs - directories to be monitored
      utilizationSpaceCutOff - minimum space, in MB, that must be available on the disk for the dir to be marked as good
    • DirectoryCollection

      public DirectoryCollection(String[] dirs, long utilizationSpaceCutOffLow, long utilizationSpaceCutOffHigh)
      Create collection for the directories specified. Users must specify the minimum amount of free space that must be available for the dir to be used.
      Parameters:
      dirs - directories to be monitored
      utilizationSpaceCutOffLow - minimum space, in MB, that must be available on the disk for the dir to be taken out of the good dirs list
      utilizationSpaceCutOffHigh - minimum space, in MB, that must be available on the disk for the dir to be moved from the bad dirs list to the good dirs list
    • DirectoryCollection

      public DirectoryCollection(String[] dirs, float utilizationPercentageCutOffHigh, float utilizationPercentageCutOffLow, long utilizationSpaceCutOff)
      Create collection for the directories specified. Users must specify the maximum percentage of disk utilization allowed and the minimum amount of free space that must be available for the dir to be used. If either check fails the dir is removed from the good dirs list.
      Parameters:
      dirs - directories to be monitored
      utilizationPercentageCutOffHigh - percentage of disk that can be used before the dir is taken out of the good dirs list
      utilizationPercentageCutOffLow - percentage of disk that can be used when the dir is moved from the bad dirs list to the good dirs list
      utilizationSpaceCutOff - minimum space, in MB, that must be available on the disk for the dir to be marked as good
    • DirectoryCollection

      public DirectoryCollection(String[] dirs, float utilizationPercentageCutOffHigh, float utilizationPercentageCutOffLow, long utilizationSpaceCutOffLow, long utilizationSpaceCutOffHigh)
      Create collection for the directories specified. Users must specify the maximum percentage of disk utilization allowed and the minimum amount of free space that must be available for the dir to be used. If either check fails the dir is removed from the good dirs list.
      Parameters:
      dirs - directories to be monitored
      utilizationPercentageCutOffHigh - percentage of disk that can be used before the dir is taken out of the good dirs list
      utilizationPercentageCutOffLow - percentage of disk that can be used when the dir is moved from the bad dirs list to the good dirs list
      utilizationSpaceCutOffLow - minimum space, in MB, that must be available on the disk for the dir to be taken out of the good dirs list
      utilizationSpaceCutOffHigh - minimum space, in MB, that must be available on the disk for the dir to be moved from the bad dirs list to the good dirs list
  • Method Details

    • setDiskUtilizationPercentageCutoff

      public void setDiskUtilizationPercentageCutoff(float utilizationPercentageCutOffHigh, float utilizationPercentageCutOffLow)
    • getDiskUtilizationSpaceCutoff

      public long getDiskUtilizationSpaceCutoff()
    • setDiskUtilizationSpaceCutoff

      public void setDiskUtilizationSpaceCutoff(long freeSpaceCutoff)
    • setDiskUtilizationSpaceCutoff

      public void setDiskUtilizationSpaceCutoff(long freeSpaceCutoffLow, long freeSpaceCutoffHigh)
    • getGoodDirsDiskUtilizationPercentage

      public int getGoodDirsDiskUtilizationPercentage()
    • setSubAccessibilityValidationEnabled

      @VisibleForTesting public void setSubAccessibilityValidationEnabled(boolean subAccessibilityValidationEnabled)