Class DirectoryCollection
java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.DirectoryCollection
Manages a list of local storage directories.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe interface provides a callback when localDirs is changed.static enumThe enum defines disk failure type. -
Constructor Summary
ConstructorsConstructorDescriptionDirectoryCollection(String[] dirs) Create collection for the directories specified.DirectoryCollection(String[] dirs, float utilizationPercentageCutOff) Create collection for the directories specified.DirectoryCollection(String[] dirs, float utilizationPercentageCutOffHigh, float utilizationPercentageCutOffLow, long utilizationSpaceCutOff) Create collection for the directories specified.DirectoryCollection(String[] dirs, float utilizationPercentageCutOffHigh, float utilizationPercentageCutOffLow, long utilizationSpaceCutOffLow, long utilizationSpaceCutOffHigh) Create collection for the directories specified.DirectoryCollection(String[] dirs, long utilizationSpaceCutOff) Create collection for the directories specified.DirectoryCollection(String[] dirs, long utilizationSpaceCutOffLow, long utilizationSpaceCutOffHigh) Create collection for the directories specified. -
Method Summary
Modifier and TypeMethodDescriptionlongintvoidsetDiskUtilizationPercentageCutoff(float utilizationPercentageCutOffHigh, float utilizationPercentageCutOffLow) voidsetDiskUtilizationSpaceCutoff(long freeSpaceCutoff) voidsetDiskUtilizationSpaceCutoff(long freeSpaceCutoffLow, long freeSpaceCutoffHigh) voidsetSubAccessibilityValidationEnabled(boolean subAccessibilityValidationEnabled)
-
Constructor Details
-
DirectoryCollection
Create collection for the directories specified. No check for free space.- Parameters:
dirs- directories to be monitored
-
DirectoryCollection
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 monitoredutilizationPercentageCutOff- percentage of disk that can be used before the dir is taken out of the good dirs list
-
DirectoryCollection
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 monitoredutilizationSpaceCutOff- 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 monitoredutilizationSpaceCutOffLow- minimum space, in MB, that must be available on the disk for the dir to be taken out of the good dirs listutilizationSpaceCutOffHigh- 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 monitoredutilizationPercentageCutOffHigh- percentage of disk that can be used before the dir is taken out of the good dirs listutilizationPercentageCutOffLow- percentage of disk that can be used when the dir is moved from the bad dirs list to the good dirs listutilizationSpaceCutOff- 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 monitoredutilizationPercentageCutOffHigh- percentage of disk that can be used before the dir is taken out of the good dirs listutilizationPercentageCutOffLow- percentage of disk that can be used when the dir is moved from the bad dirs list to the good dirs listutilizationSpaceCutOffLow- minimum space, in MB, that must be available on the disk for the dir to be taken out of the good dirs listutilizationSpaceCutOffHigh- 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)
-