public class DeviceMappingManager extends Object
Constructor and Description |
---|
DeviceMappingManager(Context context) |
Modifier and Type | Method and Description |
---|---|
void |
addDevicePluginScheduler(String resourceName,
DevicePluginScheduler s) |
void |
addDeviceSet(String resourceName,
Set<Device> deviceSet) |
org.apache.hadoop.yarn.server.nodemanager.containermanager.resourceplugin.deviceframework.DeviceMappingManager.DeviceAllocation |
assignDevices(String resourceName,
Container container) |
void |
cleanupAssignedDevices(String resourceName,
org.apache.hadoop.yarn.api.records.ContainerId containerId) |
Map<String,Set<Device>> |
getAllAllowedDevices() |
Set<Device> |
getAllocatedDevices(String resourceName,
org.apache.hadoop.yarn.api.records.ContainerId cId) |
Map<String,Map<Device,org.apache.hadoop.yarn.api.records.ContainerId>> |
getAllUsedDevices() |
int |
getAvailableDevices(String resourceName) |
Map<String,DevicePluginScheduler> |
getDevicePluginSchedulers() |
static int |
getRequestedDeviceCount(String resName,
org.apache.hadoop.yarn.api.records.Resource requestedResource) |
void |
recoverAssignedDevices(String resourceName,
org.apache.hadoop.yarn.api.records.ContainerId containerId) |
public DeviceMappingManager(Context context)
public Map<String,Map<Device,org.apache.hadoop.yarn.api.records.ContainerId>> getAllUsedDevices()
public Map<String,DevicePluginScheduler> getDevicePluginSchedulers()
public Set<Device> getAllocatedDevices(String resourceName, org.apache.hadoop.yarn.api.records.ContainerId cId)
public org.apache.hadoop.yarn.server.nodemanager.containermanager.resourceplugin.deviceframework.DeviceMappingManager.DeviceAllocation assignDevices(String resourceName, Container container) throws ResourceHandlerException
ResourceHandlerException
public void recoverAssignedDevices(String resourceName, org.apache.hadoop.yarn.api.records.ContainerId containerId) throws ResourceHandlerException
ResourceHandlerException
public void cleanupAssignedDevices(String resourceName, org.apache.hadoop.yarn.api.records.ContainerId containerId)
public static int getRequestedDeviceCount(String resName, org.apache.hadoop.yarn.api.records.Resource requestedResource)
public int getAvailableDevices(String resourceName)
public void addDevicePluginScheduler(String resourceName, DevicePluginScheduler s)
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.