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 Type
    Method
    Description
    org.apache.hadoop.yarn.api.records.Resource
    Get default supported resource profile.
    org.apache.hadoop.yarn.api.records.Resource
    Get maximum supported resource profile.
    org.apache.hadoop.yarn.api.records.Resource
    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>
    Get all supported resource profiles.
    void
    init(org.apache.hadoop.conf.Configuration config)
    Method to handle all initialization steps for ResourceProfilesManager.
    void
    Reload profiles based on updated configuration.
  • Method Details

    • init

      void init(org.apache.hadoop.conf.Configuration config) throws IOException
      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.YARNFeatureNotEnabledException
      Get 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

      void reloadProfiles() throws IOException
      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.YarnException
      Get 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.YarnException
      Get 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.YarnException
      Get 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