Interface ResourceProfilesManager
- All Known Implementing Classes:
ResourceProfilesManagerImpl
public interface ResourceProfilesManager
Interface for the resource profiles manager. Provides an interface to get
the list of available profiles and some helper functions.
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.yarn.api.records.ResourceGet default supported resource profile.org.apache.hadoop.yarn.api.records.ResourceGet maximum supported resource profile.org.apache.hadoop.yarn.api.records.ResourceGet minimum supported resource profile.org.apache.hadoop.yarn.api.records.ResourcegetProfile(String profile) Get the resource capability associated with given profile name.Get all supported resource profiles.voidinit(org.apache.hadoop.conf.Configuration config) Method to handle all initialization steps for ResourceProfilesManager.voidReload profiles based on updated configuration.
-
Method Details
-
init
Method to handle all initialization steps for ResourceProfilesManager.- Parameters:
config- Configuration object- Throws:
IOException- when invalid resource profile names are loaded
-
getProfile
org.apache.hadoop.yarn.api.records.Resource getProfile(String profile) throws org.apache.hadoop.yarn.exceptions.YarnException Get the resource capability associated with given profile name.- Parameters:
profile- name of resource profile- Returns:
- resource capability for given profile
- Throws:
org.apache.hadoop.yarn.exceptions.YarnException- when any invalid profile name or feature is disabled
-
getResourceProfiles
Map<String,org.apache.hadoop.yarn.api.records.Resource> getResourceProfiles() throws org.apache.hadoop.yarn.exceptions.YARNFeatureNotEnabledExceptionGet all supported resource profiles.- Returns:
- a map of resource objects associated with each profile
- Throws:
org.apache.hadoop.yarn.exceptions.YARNFeatureNotEnabledException- when feature is disabled
-
reloadProfiles
Reload profiles based on updated configuration.- Throws:
IOException- when invalid resource profile names are loaded
-
getDefaultProfile
org.apache.hadoop.yarn.api.records.Resource getDefaultProfile() throws org.apache.hadoop.yarn.exceptions.YarnExceptionGet default supported resource profile.- Returns:
- resource object which is default
- Throws:
org.apache.hadoop.yarn.exceptions.YarnException- when any invalid profile name or feature is disabled
-
getMinimumProfile
org.apache.hadoop.yarn.api.records.Resource getMinimumProfile() throws org.apache.hadoop.yarn.exceptions.YarnExceptionGet minimum supported resource profile.- Returns:
- resource object which is minimum
- Throws:
org.apache.hadoop.yarn.exceptions.YarnException- when any invalid profile name or feature is disabled
-
getMaximumProfile
org.apache.hadoop.yarn.api.records.Resource getMaximumProfile() throws org.apache.hadoop.yarn.exceptions.YarnExceptionGet maximum supported resource profile.- Returns:
- resource object which is maximum
- Throws:
org.apache.hadoop.yarn.exceptions.YarnException- when any invalid profile name or feature is disabled
-