DevicePlugin, DevicePluginSchedulerpublic class NECVEPlugin extends java.lang.Object implements DevicePlugin, DevicePluginScheduler
| Constructor | Description |
|---|---|
NECVEPlugin() |
| Modifier and Type | Method | Description |
|---|---|---|
java.util.Set<Device> |
allocateDevices(java.util.Set<Device> availableDevices,
int count,
java.util.Map<java.lang.String,java.lang.String> env) |
Called when allocating devices.
|
java.util.Set<Device> |
getDevices() |
Called when update node resource.
|
DeviceRegisterRequest |
getRegisterRequestInfo() |
Called first when device plugin framework wants to register.
|
DeviceRuntimeSpec |
onDevicesAllocated(java.util.Set<Device> set,
YarnRuntimeType yarnRuntimeType) |
Asking how these devices should be prepared/used
before/when container launch.
|
void |
onDevicesReleased(java.util.Set<Device> releasedDevices) |
Called after device released.
|
public NECVEPlugin()
throws ResourceHandlerException
ResourceHandlerExceptionpublic DeviceRegisterRequest getRegisterRequestInfo()
DevicePlugingetRegisterRequestInfo in interface DevicePluginDeviceRegisterRequestpublic java.util.Set<Device> getDevices()
DevicePlugingetDevices in interface DevicePluginDevice, TreeSet recommendedpublic DeviceRuntimeSpec onDevicesAllocated(java.util.Set<Device> set, YarnRuntimeType yarnRuntimeType)
DevicePluginVolumeSpec to let the
framework to create volume before running container.onDevicesAllocated in interface DevicePluginset - A set of allocated Device.yarnRuntimeType - Indicate which runtime YARN will use
Could be RUNTIME_DEFAULT or RUNTIME_DOCKER
in DeviceRuntimeSpec constants. The default means YARN's
non-docker container runtime is used. The docker means YARN's
docker container runtime is used.DeviceRuntimeSpec description about environment,
VolumeSpec, MountVolumeSpec. etcpublic void onDevicesReleased(java.util.Set<Device> releasedDevices)
DevicePluginonDevicesReleased in interface DevicePluginreleasedDevices - A set of released devicespublic java.util.Set<Device> allocateDevices(java.util.Set<Device> availableDevices, int count, java.util.Map<java.lang.String,java.lang.String> env)
DevicePluginSchedulerallocateDevices in interface DevicePluginScheduleravailableDevices - Devices allowed to be chosen from.count - Number of device to be allocated.env - Environment variables of the container.Device allocatedCopyright © 2008–2025 Apache Software Foundation. All rights reserved.