Class ResourceProfilesManagerImpl

java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.resource.ResourceProfilesManagerImpl
All Implemented Interfaces:
ResourceProfilesManager

public class ResourceProfilesManagerImpl extends Object implements ResourceProfilesManager
PBImpl class to handle all proto related implementation for ResourceProfilesManager.
  • Field Details

  • Constructor Details

    • ResourceProfilesManagerImpl

      public ResourceProfilesManagerImpl()
  • Method Details

    • init

      public void init(org.apache.hadoop.conf.Configuration config) throws IOException
      Description copied from interface: ResourceProfilesManager
      Method to handle all initialization steps for ResourceProfilesManager.
      Specified by:
      init in interface ResourceProfilesManager
      Parameters:
      config - Configuration object
      Throws:
      IOException - when invalid resource profile names are loaded
    • getProfile

      public org.apache.hadoop.yarn.api.records.Resource getProfile(String profile) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: ResourceProfilesManager
      Get the resource capability associated with given profile name.
      Specified by:
      getProfile in interface ResourceProfilesManager
      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

      public Map<String,org.apache.hadoop.yarn.api.records.Resource> getResourceProfiles() throws org.apache.hadoop.yarn.exceptions.YARNFeatureNotEnabledException
      Description copied from interface: ResourceProfilesManager
      Get all supported resource profiles.
      Specified by:
      getResourceProfiles in interface ResourceProfilesManager
      Returns:
      a map of resource objects associated with each profile
      Throws:
      org.apache.hadoop.yarn.exceptions.YARNFeatureNotEnabledException - when feature is disabled
    • reloadProfiles

      @VisibleForTesting public void reloadProfiles() throws IOException
      Description copied from interface: ResourceProfilesManager
      Reload profiles based on updated configuration.
      Specified by:
      reloadProfiles in interface ResourceProfilesManager
      Throws:
      IOException - when invalid resource profile names are loaded
    • getDefaultProfile

      public org.apache.hadoop.yarn.api.records.Resource getDefaultProfile() throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: ResourceProfilesManager
      Get default supported resource profile.
      Specified by:
      getDefaultProfile in interface ResourceProfilesManager
      Returns:
      resource object which is default
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - when any invalid profile name or feature is disabled
    • getMinimumProfile

      public org.apache.hadoop.yarn.api.records.Resource getMinimumProfile() throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: ResourceProfilesManager
      Get minimum supported resource profile.
      Specified by:
      getMinimumProfile in interface ResourceProfilesManager
      Returns:
      resource object which is minimum
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - when any invalid profile name or feature is disabled
    • getMaximumProfile

      public org.apache.hadoop.yarn.api.records.Resource getMaximumProfile() throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: ResourceProfilesManager
      Get maximum supported resource profile.
      Specified by:
      getMaximumProfile in interface ResourceProfilesManager
      Returns:
      resource object which is maximum
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - when any invalid profile name or feature is disabled