java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.containermanager.resourceplugin.ResourcePluginManager

public class ResourcePluginManager extends Object
Manages ResourcePlugin configured on this NodeManager.
  • Constructor Details

    • ResourcePluginManager

      public ResourcePluginManager()
  • Method Details

    • initialize

      public void initialize(Context context) throws org.apache.hadoop.yarn.exceptions.YarnException, ClassNotFoundException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      ClassNotFoundException
    • initializePluggableDevicePlugins

      public void initializePluggableDevicePlugins(Context context, org.apache.hadoop.conf.Configuration configuration, Map<String,ResourcePlugin> pluginMap) throws org.apache.hadoop.yarn.exceptions.YarnRuntimeException, ClassNotFoundException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnRuntimeException
      ClassNotFoundException
    • checkInterfaceCompatibility

      @VisibleForTesting public void checkInterfaceCompatibility(Class<?> expectedClass, Class<?> actualClass) throws org.apache.hadoop.yarn.exceptions.YarnRuntimeException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnRuntimeException
    • isConfiguredResourceName

      @VisibleForTesting public boolean isConfiguredResourceName(String resourceName)
    • setDeviceMappingManager

      @VisibleForTesting public void setDeviceMappingManager(DeviceMappingManager deviceMappingManager)
    • getDeviceMappingManager

      public DeviceMappingManager getDeviceMappingManager()
    • cleanup

      public void cleanup() throws org.apache.hadoop.yarn.exceptions.YarnException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
    • getNameToPlugins

      public Map<String,ResourcePlugin> getNameToPlugins()
      Get resource name (such as gpu/fpga) to plugin references.
      Returns:
      read-only map of resource name to plugins.