public class ResourceProfilesManagerImpl extends Object implements ResourceProfilesManager
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_PROFILE |
static String |
MAXIMUM_PROFILE |
static String |
MINIMUM_PROFILE |
protected ReentrantReadWriteLock.ReadLock |
readLock |
protected ReentrantReadWriteLock.WriteLock |
writeLock |
Constructor and Description |
---|
ResourceProfilesManagerImpl() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.yarn.api.records.Resource |
getDefaultProfile()
Get default supported resource profile.
|
org.apache.hadoop.yarn.api.records.Resource |
getMaximumProfile()
Get maximum supported resource profile.
|
org.apache.hadoop.yarn.api.records.Resource |
getMinimumProfile()
Get minimum supported resource profile.
|
org.apache.hadoop.yarn.api.records.Resource |
getProfile(String profile)
Get the resource capability associated with given profile name.
|
Map<String,org.apache.hadoop.yarn.api.records.Resource> |
getResourceProfiles()
Get all supported resource profiles.
|
void |
init(org.apache.hadoop.conf.Configuration config)
Method to handle all initialization steps for ResourceProfilesManager.
|
void |
reloadProfiles()
Reload profiles based on updated configuration.
|
public static final String DEFAULT_PROFILE
public static final String MINIMUM_PROFILE
public static final String MAXIMUM_PROFILE
protected final ReentrantReadWriteLock.ReadLock readLock
protected final ReentrantReadWriteLock.WriteLock writeLock
public void init(org.apache.hadoop.conf.Configuration config) throws IOException
ResourceProfilesManager
init
in interface ResourceProfilesManager
config
- Configuration objectIOException
- when invalid resource profile names are loadedpublic org.apache.hadoop.yarn.api.records.Resource getProfile(String profile) throws org.apache.hadoop.yarn.exceptions.YarnException
ResourceProfilesManager
getProfile
in interface ResourceProfilesManager
profile
- name of resource profileorg.apache.hadoop.yarn.exceptions.YarnException
- when any invalid profile name or feature is disabledpublic Map<String,org.apache.hadoop.yarn.api.records.Resource> getResourceProfiles() throws org.apache.hadoop.yarn.exceptions.YARNFeatureNotEnabledException
ResourceProfilesManager
getResourceProfiles
in interface ResourceProfilesManager
org.apache.hadoop.yarn.exceptions.YARNFeatureNotEnabledException
- when feature is disabledpublic void reloadProfiles() throws IOException
ResourceProfilesManager
reloadProfiles
in interface ResourceProfilesManager
IOException
- when invalid resource profile names are loadedpublic org.apache.hadoop.yarn.api.records.Resource getDefaultProfile() throws org.apache.hadoop.yarn.exceptions.YarnException
ResourceProfilesManager
getDefaultProfile
in interface ResourceProfilesManager
org.apache.hadoop.yarn.exceptions.YarnException
- when any invalid profile name or feature is disabledpublic org.apache.hadoop.yarn.api.records.Resource getMinimumProfile() throws org.apache.hadoop.yarn.exceptions.YarnException
ResourceProfilesManager
getMinimumProfile
in interface ResourceProfilesManager
org.apache.hadoop.yarn.exceptions.YarnException
- when any invalid profile name or feature is disabledpublic org.apache.hadoop.yarn.api.records.Resource getMaximumProfile() throws org.apache.hadoop.yarn.exceptions.YarnException
ResourceProfilesManager
getMaximumProfile
in interface ResourceProfilesManager
org.apache.hadoop.yarn.exceptions.YarnException
- when any invalid profile name or feature is disabledCopyright © 2008–2023 Apache Software Foundation. All rights reserved.